PDA

View Full Version : openCV upside down problem



altf4
18th February 2010, 03:02
Hi people, i am new here, nice to meet you all.

i have came across a small problem with openCV outputting images upside down from my webcamera,
i'm basically just following tutorials from the O'reilly book,

when i use the following function,



cvSmooth(source,out, smoothType, param1, param2);

cvShowImage("mywindow", out);


the image gets reversed upside down, but not left-to-right

i am using Qt 4,
and openCV version 1.0

and it seems like this problem also occurs on other functions..
since the application by windel also appeared upside down for me
http://www.qt-apps.org/content/show.php/Qt+Opencv+webcam+viewer?content=89995

please help thanks !!

boheman
13th July 2010, 22:06
I started learning openCV and encountered same problem.. I later found out the solution. In windows, the BMP is scanned from bottom-left upward. Therefore, if you are working in windows (like me), you may want to add this line:

out->origin = IPL_ORIGIN_BL;

right after you allocation memory.