tags:

views:

29

answers:

2

Hi Guys, I'm working with an image processing project where I'm trying to locate features on a .bmp image. I'm writing the whole source code in C.

The algorithm I'm developing is going to search for some features, if a desired feature was found by the algorithm then it is going to create a point (x co-ord, y co-ord), now I want to overlay this point on the image with a green or red DOT.

As of now its only a point, later on I wish to draw a box around a group of features- for example a face.

I don't know how to do this, I'm developing this in Linux (Ubuntu 9.04) environment, can anyone suggest what I should do?

Vikram

+1  A: 

I would recommend using Cairo for your drawing. What you can do is load the image into an Image Surface, do your processing on the image surface using direct pixel access, and then use a Cairo context to draw what you need. The library also supports text using libpango, and Ubuntu loves the use of Cairo since GTK uses it. There are many tutorials for Cairo as well if you search around. The main site has some already.

SB
+1  A: 

Take a look at ImageMagick as well. I've used it in the past with Perl, but it has a C interface as well.

ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

tomlogic