How To Flip Image in Real Time Video Using Matlab
How To Flip Image in Real Time Video Using Matlab
2011
This idea comes up when i found that my webcam displays my picture flipped. It means when you wave your right hand, webcam display it in the left side, viceversa. Well, it will be a big issue when we want to use image acquired as mouse controller. My first idea is to give simple computation for matlab to understand which is right hand and which is not. But it ends up to what so called as nonproffesional code programming. Haha... Now i try to develop a code to flip each frame catched by matlab. This code use fliplr toolbox or maybe you can try fliprl, in my mind thay will contribute same result. Steps you may follow to flip object in real time video is as below: Get one frame to process In this case, we set ReturnedColorspace property to RGB. Then, we separate them into R, G and B component. After that we flip each component then mix them using cat toolbox.
dataa = getsnapshot(vid); % flipping each frame data1=dataa(:,:,1); data1=fliplr(data1); data2=dataa(:,:,2); data2=fliplr(data2); data3=dataa(:,:,3); data3=fliplr(data3);
2011
First picture below will show you the original image catch by webcam through matlab and second image is flipped image.
Flipped image