|
153 | 153 | anaglyph_synth = uint8(leftImage_synth+rightImage_synth);
|
154 | 154 | figure,image(anaglyph_synth), title('Synthesized Anaglyph')
|
155 | 155 |
|
156 |
| -function paddedMatrix = paddingZeros(matrix, divisor) |
157 |
| - %paddedMatrix = zeros(size(matrix,1), size(matrix,2), size(matrix,3)); |
158 |
| - rows = size(matrix,1); |
159 |
| - cols = size(matrix,2); |
160 |
| - paddedMatrix = wextend('ar','sym',matrix, round(rows/divisor)*divisor - rows, 'd'); |
161 |
| - paddedMatrix = wextend('ac','sym',paddedMatrix, round(cols/divisor)*divisor - cols, 'l'); |
162 |
| -end |
| 156 | +%%% WIP %%%%%% |
| 157 | +% Encode each eye's image using filters of different (usually chromatically opposite) colors, red and blue |
| 158 | +rightImage_synth = imtranslate(rightImage_synth,[10, 0]); |
| 159 | + |
| 160 | +figure,image(uint8(rightImage_synth)), title('Anaglyph Synth'); |
| 161 | +r = zeros(size(rightImage_synth)); |
| 162 | +gb = zeros(size(leftImage_synth)); |
| 163 | +r(:,:,1) = double(rightImage_synth(:,:,1)); |
| 164 | +gb(:,:,2:3) = double(leftImage_synth(:,:,2:3)); |
| 165 | +anaglyph = uint8(r+gb); |
| 166 | +figure,image(anaglyph), title('Anaglyph Synth'); |
| 167 | + |
| 168 | +% Create stereo anaglyph with Matlab function to check the result |
| 169 | +J = stereoAnaglyph(leftImage_synth, rightImage_synth); |
| 170 | +figure, image(uint8(J)), title('Anaglyph using Matlab function') |
0 commit comments