O'Reilly logo

Emgu CV Essentials by Shin Shi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with images

After understanding the basics of an image, the first thing is to create a new image with specific parameters.

Creating an image

We can create an image by two different callings. Although it is possible to do it by calling CvInvoke.cvCreateImage, like we did in Chapter 3, Hello World, it is suggested to construct an Image<TColor, TDepth> object instead from now on. The advantages of using this object are as follows:

  • Automatic garbage collection
  • Can be debugged more easily with debugger visualizer
  • More advanced methods

Now we are going to create a 320 x 240 image of Bgr (blue, green, and red) color with 8 bits for each color component. We want the background color to be blue. Start a new project and add the references. In the design ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required