Author Topic: CV  (Read 5918 times)

Offline suslikova

  • Single posting newcomer
  • *
  • Posts: 4
CV
« 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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CV
« Reply #1 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.
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.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: CV
« Reply #2 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.

Offline suslikova

  • Single posting newcomer
  • *
  • Posts: 4
Re: CV
« Reply #3 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.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: CV
« Reply #4 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?

Offline suslikova

  • Single posting newcomer
  • *
  • Posts: 4
Re: CV
« Reply #5 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 :)