i m working on video analysing program where i have to measure the height of the incoming video stream object, Now i took the video stream into the matlab. I couldnt do the measurement part .Can u pls help me with this analysing part.
No products are associated with this question.
the object will be in the same distance. The object height varies(withn the known region) and it has to be measured.
Provided that the same aperture will always be used, since the object will always be at the same distance, the easiest way to proceed would be to start by inserting an object of known size into the scene, taking an image of it, and finding the height in pixels of the known real-world height. Once you have the height in pixels, you can trivially calculate a scaling factor between pixels and real-world.
After that, it just becomes a matter of figuring out the size in pixels of each presented object, and multiplying that by the real-world scale factor previously calculated. As long as nothing changes (e.g., distance does not change.)
im=imread('*.jpg'); red=im(:,:,1); green=im(:,:,2); blue=im(:,:,3); light=red>200&green>200&blue>200; [x,c]=find(light); x2=max(x); x1=min(x); y2=max(c); y1=min(c); x2 774 x1 9 y2 765 y1 10
Warning: Image is too big to fit on screen; displaying at 56% scale.
this is the answer i got for pixel measurement.