Core Function: cvconvertimage
Program:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/D6/wKiom1PsXsjReR21AACwaulGOsg938.jpg "Title =" clipboard.png "alt =" wkiom1psxsjrer21aacwaulgosg938.jpg "/>
Code:
# Include "CV. H "# include" cxcore. H "# include" highgui. H "# include <iostream> int convertimage (INT argc, char ** argv) {iplimage * src = cvloadimage (" E: \ picture \ 4.jpg "); iplimage * DST = cvcreateimage (cvgetsize (SRC), 8, 1); cvconvertimage (SRC, DST, cv_cvtimg_flip); // flip up/down and add cvnamedwindow ("src") for color conversion "); cvnamedwindow ("DST"); cvshowimage ("src", Src); cvshowimage ("DST", DST); cvwaitkey (0); cvdestroywindow ("src "); cvdestroywindow ("DST"); cvreleaseimage (& SRC); cvreleaseimage (& DST); Return 0 ;}
This article is from the "flyclc" blog, please be sure to keep this source http://flyclc.blog.51cto.com/1385758/1539937