Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: suslikova on August 05, 2013, 04:08:48 pm

Title: CV
Post by: 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. 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
Title: Re: CV
Post by: ollydbg on August 05, 2013, 04:46:28 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.
Title: Re: CV
Post by: scarphin on August 05, 2013, 11:52:55 pm
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.
Title: Re: CV
Post by: suslikova on August 06, 2013, 09:56:22 am
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.
Title: Re: CV
Post by: scarphin on August 06, 2013, 10:33:37 am
Can you please post the part of the code where it fails to open the image and the full path to the failed image?
Title: Re: CV
Post by: suslikova on August 07, 2013, 10:32:19 am
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 :)