Skip to content

Commit ff628a1

Browse files
committed
Merge commit 'cfa72458e45e779683862d0bd450908d9d21b0a4' into iuya
2 parents 1414c85 + cfa7245 commit ff628a1

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

Stereoscopy/stereoscopy_script.m

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
img1 = imread('../Test-images/stereoscopy-images/image3.jpg');
2+
figure; image(img1), title('Original Image'); % Original image
3+
4+
% Split them into 2 separate images
5+
leftImage = img1(:,1:end/2,:);
6+
rightImage = img1(:,end/2+1:end,:);
7+
figure; image(leftImage), title('Left Image');
8+
figure; image(rightImage), title('Right Image');
9+
10+
% Encode each eye's image using filters of different (usually chromatically opposite) colors, red and blue
11+
r = zeros(size(leftImage));
12+
gb = zeros(size(rightImage));
13+
r(:,:,1) = double(leftImage(:,:,1));
14+
gb(:,:,2:3) = double(rightImage(:,:,2:3));
15+
anaglyph = uint8(r+gb);
16+
figure,image(anaglyph), title('My Anaglyph')
17+
18+
% Create stereo anaglyph with Matlab function to check the result
19+
J = stereoAnaglyph(leftImage,rightImage);
20+
figure, image(J), title('Anaglyph using Matlab function')
21+
22+
% Use TD3 to code them using 2 decomposition layers
23+
img_lena = imread('../Test-images/lena_gray_512.tif');
24+
25+
%leftImage_haar = haar_transform_multilevel(leftImage,2);
26+
%rightImage_haar = haar_transform_multilevel(rightImage,2);
65 KB
Loading
72.9 KB
Loading
91.2 KB
Loading

0 commit comments

Comments
 (0)