5

How to load an image from a specific folder using Emgu cv CvInvoke.cvLoadImage(...)?I am tryng to do it like this

    IntPtr inputImage = CvInvoke.cvLoadImage("C:\\Users\\...\\ClassPic1.jpg");

Is that ok? If so, How am i gonna access it later as an Emgu.CV.Image file so that i will do my image processing on it?

Pedram
  • 728
  • 3
  • 10
  • 29
Sisay
  • 681
  • 7
  • 16
  • 31

2 Answers2

14

You should probably use the following method to load the image:

Image<Bgr, Byte> img1 = new Image<Bgr, Byte>("..\\..\\MyImage.jpg");// path can be absolute or relative.

this img1 variable can be accessed later to perform manipulations on it.

check this link for more details. http://www.emgu.com/wiki/index.php/Working_with_Images

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
Shiva
  • 6,677
  • 4
  • 36
  • 61
  • I know that what i just want to know is how to directly use the open cv functions on Emgu cv using cvInvoke.Thanks though – Sisay Jun 22 '13 at 15:37
1

OpenCV functions are in CvInvoke class

so: CvInvoke.

those are all static functions.

dajuric
  • 2,373
  • 2
  • 20
  • 43