how to handle with data in matrix, instead of image.?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to handle with data in matrix, instead of image.?

koju2000
Dear group,
 
if we use normal function such
cvGoodFeaturesToTrack or
cvCalcOpticalFlowPyrLK and so on
 
there work very well, however the input should came from a real photo of webcam by using a library  IplImage *image (..............)
 
my question is if I have a image data but in matrix form not in jpg, bmp or avi. How can I use a function from openCV.
 
If data is matrix [m*n]200*200, How can I find the corner in this data?
 
thank you for all suggestions
 
regard
CJ
 


     

[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: how to handle with data in matrix, instead of image.?

asm warrior
Chanin Germany wrote:

> Dear group,
>  
> if we use normal function such
> cvGoodFeaturesToTrack or
> cvCalcOpticalFlowPyrLK and so on
>  
> there work very well, however the input should came from a real photo of webcam by using a library  IplImage *image (..............)
>  
> my question is if I have a image data but in matrix form not in jpg, bmp or avi. How can I use a function from openCV.
>  
> If data is matrix [m*n]200*200, How can I find the corner in this data?
>  
> thank you for all suggestions
>  
> regard
> CJ
>  
>  
Create an image Header, and cheat the data as raster data of the image.
I found a sample code like below:

|IplImage* image = cvCreateImageHeader(cvSize(200, 200), 8, 1);
char* data = new char[200*200];
cvSetData(image, data, 200);
cvReleaseImageHeader(&image);
delete []data;

You can try it!
|


[Non-text portions of this message have been removed]