News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

CV

Started by suslikova, August 05, 2013, 04:08:48 PM

Previous topic - Next topic

suslikova

hello,

I am interested in computer vision. I have downloaded OpenCV file in C and thanks to perfect Wiki "how to" I am now able to run all Samples in CodeBlock. Problem is that I am not able to open any images /which are also in Samples folder/-  always there is dialog Image cannot be open. I tried everything /transformation of image from jpeg into pdb, command line/ but nothing works.

any advice?

Petra

ollydbg

Quote from: suslikova on August 05, 2013, 04:08:48 PM
hello,

I am interested in computer vision. I have downloaded OpenCV file in C and thanks to perfect Wiki "how to" I am now able to run all Samples in CodeBlock.
Good to hear.

Quote
Problem is that I am not able to open any images /which are also in Samples folder/-  always there is dialog Image cannot be open.
Describe the problem in details. BTW, did you debug your sample code under a debugger (like GDB)? That will reveal every thing of your program.

Quote
I tried everything /transformation of image from jpeg into pdb, command line/ but nothing works.
any advice?
I know nothing about "pdb", "nothing works" is not a good question and I guess no one can give you the answer.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

scarphin

OpenCV can open image files in many formats and .jpg is surely one of them. I don't think that's a matter of file format but maybe a 'path to your samples' issue.

suslikova

Thank you.
So its not question of image format. Its good to know.
I have tried- accoring to wiki´s "how to- liberaries- open cv"-- CB--Project--Set program arguments--lena.jpeg--ok, but it
doesnt work.
I tried also computer--system properties.-- system variables--  Path  but it also doesnt work.
Have I forgotten anything?
Samples openCV, which use notebook camera and animations run in CodeBlocks normally, applications which use .jpeg end with message- image cannot be open.

P.

scarphin

Can you please post the part of the code where it fails to open the image and the full path to the failed image?

suslikova

hello,

I have found, where the problem was. I must say, this was rather hard way to make OpenCV work- I must changed several times IDE /normally I use NetBeans, then I go to Qt creator and at last I tried CodeBlocks and it works. The problem was, I opened Samples with Qt and then coppied it to CB by Ctrl + C... But it must be opened CB and then OpenCV...Samples.

Thank you all very much. Nice day.   Petra :)