softmessager
July 22nd, 2005, 07:35 AM
I am a newbe in opencv as well as programming.
Currently I am working on an image processing software that does Vision Inspection of finished products. I am using VC++ 6 platform and the camera is basler
Two Probems I am facing is m
1. At some point of execution of my program, A dialogbox is thrown saying
eg:
Function cvGetImageROIRect in line no so and so in xxxx.cpp
Status 5 <or 1 >
Null Array
Action Backtrack
etc etc comes and thre buttons Abort Retry Ignore
appears.. sometimes I click one ignore or I have to click many ignores ... The Processing continues at the background.. But Occassionally the error shows at last that my application has been shot down and that Send error report, dont send etc...
I think I need error handling mechanism for my program.
I read the documents and felt very vonfused..... can anyone please give a simple example ...
an Example of my code is
IpImage *image,*img,*imgsize .... etc
img = cvLoadImage(Path);
cvCanny(img,img,0.0h ...etc..etcc..);
cvGetRawData(img,&data,&step,&sixe,);
then some for loops checking out the pixels and then finaly gicing out the result of pass or fail
.now at some point in my execution the above dialog box is thrown. Now how to include error handling on this code ??
I am not an advanced programmer .. I am working on a code developed by somebody else and am providing support. please help ....... please show me how to include the cv Error in this code..
2. While running the software, for the first 50 devices or so, the program display works very fine. ie, I have to display red spots where the device has scratches or cracks. and for the first 50 devices, the red spots are shown correctly and as time goes by , the number of red spots reduces and so does the rejection. Why is it so ?? my speed is 200 devices per minute... So does it have anything to do with the algoritham cvCanny ??
I have no memory leakages my memory usage s very optimal and consistent ...
3. Just like we can set ROI (region of interest) as a square. Is it possible to set ROI as round ??
or to put it in another way, I want to check whether a logo is coming exactly in the centre of a corcular region ... I can count the number of black pizels to white pixels ...but if the logo is shifted towards the end, it should reject..
Currently I am using a Square ROI inside the circle and counting the black pixels of the binary image. The logo is oval..
Please help on any or all the above issues I would be grateful ... I am really beginning to like opencv and want to implement it more and more..
Sincerely yours
Ajit.V.Gupta
Currently I am working on an image processing software that does Vision Inspection of finished products. I am using VC++ 6 platform and the camera is basler
Two Probems I am facing is m
1. At some point of execution of my program, A dialogbox is thrown saying
eg:
Function cvGetImageROIRect in line no so and so in xxxx.cpp
Status 5 <or 1 >
Null Array
Action Backtrack
etc etc comes and thre buttons Abort Retry Ignore
appears.. sometimes I click one ignore or I have to click many ignores ... The Processing continues at the background.. But Occassionally the error shows at last that my application has been shot down and that Send error report, dont send etc...
I think I need error handling mechanism for my program.
I read the documents and felt very vonfused..... can anyone please give a simple example ...
an Example of my code is
IpImage *image,*img,*imgsize .... etc
img = cvLoadImage(Path);
cvCanny(img,img,0.0h ...etc..etcc..);
cvGetRawData(img,&data,&step,&sixe,);
then some for loops checking out the pixels and then finaly gicing out the result of pass or fail
.now at some point in my execution the above dialog box is thrown. Now how to include error handling on this code ??
I am not an advanced programmer .. I am working on a code developed by somebody else and am providing support. please help ....... please show me how to include the cv Error in this code..
2. While running the software, for the first 50 devices or so, the program display works very fine. ie, I have to display red spots where the device has scratches or cracks. and for the first 50 devices, the red spots are shown correctly and as time goes by , the number of red spots reduces and so does the rejection. Why is it so ?? my speed is 200 devices per minute... So does it have anything to do with the algoritham cvCanny ??
I have no memory leakages my memory usage s very optimal and consistent ...
3. Just like we can set ROI (region of interest) as a square. Is it possible to set ROI as round ??
or to put it in another way, I want to check whether a logo is coming exactly in the centre of a corcular region ... I can count the number of black pizels to white pixels ...but if the logo is shifted towards the end, it should reject..
Currently I am using a Square ROI inside the circle and counting the black pixels of the binary image. The logo is oval..
Please help on any or all the above issues I would be grateful ... I am really beginning to like opencv and want to implement it more and more..
Sincerely yours
Ajit.V.Gupta