Code covered by the BSD License  

Highlights from
image effect

4.66667

4.7 | 3 ratings Rate this file 40 Downloads (last 30 days) File Size: 13.93 KB File ID: #33147
image thumbnail

image effect

by 123456

 

06 Oct 2011 (Updated 31 Oct 2011)

lets you take a picture or browse for it and put some effects on it

| Watch this File

File Information
Description

Actually, I submitted this file to check whether other people can use it, because this program is supposed to detect any cameras installed on the computer and let the user select which camera to use.
So please reply whether it works on your camera or not.

I would like to thank Gabi Teodoru for making YUY2toRGB as it helped in making this code

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
YUY2 to RGB converter

Required Products Image Acquisition Toolbox
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (9)
09 Oct 2011 GANESH Prabhakar

Hi, This is Ganesh http://in.linkedin.com/pub/ganesh-prabhakar-p/24/942/b2

I tested this function,it is working fine with my web camera.

but the problem is there is no preview in the axes1 before taking picture..

is thr any fuction regarding that.. plz help me..

09 Oct 2011 123456

Sorry Ganesh, but I don't understand your question. Do you mean you want live inversion? Or do you mean that you would like to take a 'trial picture' before inverting, in which case you can press the 'invert button' again to take another picture

09 Oct 2011 123456

I mean "you can press the 'Take your picture' button again to take another picture."

22 Oct 2011 Mr Smart  
26 Oct 2011 123456

So can anyone tell me whether this code worked on their computer or not?

30 Oct 2011 Anon

This is quite cumbersome:

r=img(:,:,1);
g=img(:,:,2);
b=img(:,:,3);

invr=255-r;
invg=255-g;
invb=255-b;

img(:,:,1)=invr;
img(:,:,2)=invg;
img(:,:,3)=invb;

You could just write
img = 255-img;

02 Nov 2011 123456

Thank you Anon, for your reply. Now my code is a bit shorter and I've learnt something new about MATLAB. If anyone else can spot any mistakes or errors, please tell me because it helps me learn more

03 Nov 2011 john

nice GUI. I learnt a lot from this and now can make my own GUIs

02 Feb 2012 Roxy

Hi,
interestingly, your code does not seem to detect my camera , even though i seem my option listed on your GUI, but i am unable to take a picture or continue with it.

Please login to add a comment or rating.
Updates
21 Oct 2011

I made the modal question a bit shorter

21 Oct 2011

fixed the errors

25 Oct 2011

fixed the error ??? Reference to non-existent field 'rgb'.

27 Oct 2011

made the two static texts in 'modal question' so that it looks connected

28 Oct 2011

added 'imaqreset' so that the detection of cameras would be more accurate and added the 'grayscale' buton

31 Oct 2011

added the 'save button', 'display same picture' button, and 'open in Image Viewer' button. Also edited in accordance to Anon

Tag Activity for this File
Tag Applied By Date/Time
image processing 123456 06 Oct 2011 12:24:24
gui 123456 06 Oct 2011 12:24:24
invert color 123456 06 Oct 2011 12:24:24
camera 123456 06 Oct 2011 12:24:24

Contact us at files@mathworks.com