Author Topic: Beginner Image Recognition  (Read 4799 times)

0 Members and 1 Guest are viewing this topic.

Offline stalepretzelTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Beginner Image Recognition
« on: April 04, 2007, 11:39:36 AM »
Hello, I am interested in image recognition, and I'd like to begin with some elementary image transformations.  I have a basic understanding of the concepts, but i don't know how to turn something like a bitmap into a convenient little matrix :).  I'm trying to open small bitmaps up in notepad (and attempt to decipher the strings of text), but I'd like to know how everyone else does it.  Thanks. 

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: Beginner Image Recognition
« Reply #1 on: April 04, 2007, 12:08:24 PM »
so i'm not sure about bitmaps but for .png and .jpeg formats there are libraries to convert the image into nice (x,y) arrays for most programing languages.
i know these exist for c++ and python.
you can probably find similar for bitmaps and programing languages with a bit of searching.

dunk.

Offline Somchaya

  • Robot Overlord
  • ****
  • Posts: 180
  • Helpful? 0
  • You know it's cute!
Re: Beginner Image Recognition
« Reply #2 on: April 04, 2007, 12:17:42 PM »
Hmm for most (all?) image formats, it starts off with a header of some sort, that describes the width/height of the image, and other things, and then comes all the actual pixel information. Depending on the image format, and settings (for eg bmp has multiple different settings, like 8 bits per pixel, 16, 24, 32 etc), the data information has to be interpreted differently.

The easiest way to do this would be to find some image loading code online in the language of your choice and look through it. Of course, having a tutorial that tells you the file structure is very useful (wikipedia usually has good information).

If you're doing it in java, the ImageIO class is capable of loading images from disk, and you can retrieve the pixel information from an Image class it returns. I'm pretty sure code like this exists for most other common languages though.
Somchaya - Back after a year of misc things
http://whisker.scribblewiki.com

 


Get Your Ad Here