Anaglyph3D

Create stereoscopic 3D anaglyph images
267 descargas
Actualizado 6 abr 2017

Ver licencia

Anaglyph3D - Create stereoscopic 3D anaglyph images --

Anaglyph3D takes two pictures as an input (one shot from the left
and one shot from the right) and merges them into one 3D stereoscopic
image. The resulting 3D anaglyph stereo image can be adjusted
by shifting and/or rotating one of the input images.
After such adjustement, the result can be saved to a JPG image file.

Function syntax:
anaglyph3d(image1, image2, filter1, filter2)

Examples (work with sample pictures included in the package):
anaglyph3d('MadameHoudonL.jpg','MadameHoudonR.jpg','red','cyan')
anaglyph3d('VoltaireL.jpg','VoltaireR.jpg','red','blue')
anaglyph3d('PascalL.jpg','PascalR.jpg','green','magenta')

- 'image1' is static, it doesn't move at all,
- 'image2' is the one that is shifted or rotated,
- image files must be located in the same folder as this file,
- both images must have the same resolution (size in pixels),
- large (high resolution) images are not recommended due to overload;
- supported anaglyph filters for left and right eyes are:
red, green, blue, cyan and magenta.

The following keys are used for adjustments and saving:

arrowkey "up" - shifts 'image2' upwards,
arrowkey "down" - shifts 'image2' downwards,
arrowkey "left" - shifts 'image2' to the left,
arrowkey "right" - shifts 'image2' to the right,
"+"(plus) or "x" - rotates 'image2' anti-clockwise,
"-"(minus) or "c" - rotates 'image2' clockwise,
"space" - swaps the filters (e.g. "red-blue" to "blue-red"),
"s" - saves the stereo anaglyph image to 'output.jpg',
"h" - opens help window.

Anaglyph3D has been developed and tested on MATLAB R2013a and R2015a.
---------------------------------------------------------------------
I am grateful to Professor Igor Podlubny (http://www.tuke.sk/podlubny/)
for the formulating this exercise and for providing the sample photos
(6 files), which are included with this file.
Author: Matej Mikulszky, October 2016
email: matej.mikulszky@student.tuke.sk
Student, Technical University, Kosice, Slovakia
---------------------------------------------------------------------
UPDATES:
Version 1.1: April 6th, 2017
- Fixed width or height on startup, for all types of screens.
- Application window is now resizable.
- Anaglyph's aspect ratio is preserved when shifting/rotating image.
- Using more "fluid" function for drawing anaglyph.

Citar como

Matej Mikulszky (2024). Anaglyph3D (https://www.mathworks.com/matlabcentral/fileexchange/59537-anaglyph3d), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2015a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.1.0.0

Fixed width or height on startup, for all types of screens. Application window is now resizable. Anaglyph's aspect ratio is preserved when shifting/rotating image. Using more "fluid" function for drawing anaglyph.

1.0.0.0