1 | initial version |
hi i dont understand exactly what you say but i explain a bit about load image to program in additional code for add image to program you shoulad use
IplImage* img = cvLoadImage( "image.jpg" );
This line loads the image.* The function cvLoadImage()is a high-level routine that determines the file format to be loaded based on the fi le name; it also automatically allocates the memory needed for the image data structure. Note that cvLoadImage()can read a wide variety of image formats, including BMP, DIB, JPEG, JPE, PNG, PBM, PGM, PPM, SR, RAS, and TIFF. A pointer to an allocated image data structure is then returned. Th is structure, called IplImage, is the OpenCV construct with which you will deal the most.
but in c api at first you define a mat image that a image is like a mat after you read file from computer a depend to type of image like cv_8uc3 pixel to pixel of image(i.e inetensity if pixels) copy to mat and when u have 3 channels image indeed you have 3 mat or every location of mat has 3 value (intensity) at this state every image is mat finish ok ?