Load and read image pixel properties on Arduino

Hi all,

I know we can do that on Processing but I'm wondering if we can read image properties on Arduino like a GetPixel on something like that with a small image (like 225 octets without any SD card) ?

Cheers :) !

I'm wondering if we can read image properties on Arduino like a GetPixel on something like that with a small image (like 225 octets without any SD card) ?

Yes. What have you tried?

Thanks for your quick answer !

I explain you my problem. I try to get the RGB pixel properties of an image and his position XY. I've tried to do it with Processing but my serial connection between Processing and Arduino is very approximate (maybe a wrong delay and/or configuration between them). That's why I'm wondering if we can do that directly on Arduino without serial communication.

I googled "getpixel" on Arduino but several posts was about "TFTLCD library" and SD library. It doesn't match with my project which is to load an image on a Rainbowduino + 8x8 RGB.

Thanks :)

I googled "getpixel" on Arduino but several posts was about "TFTLCD library" and SD library. It doesn't match with my project which is to load an image on a Rainbowduino + 8x8 RGB.

I didn't say that you could use the same function that you use in Processing. That function accesses specific data in a specific format, and returns the data that it finds. You have not defined what data you will call your GetPixel() function for, nor have you defined the format of that data. Once you do, writing GetPixel() will be trivial.

Well, the first thing is to load an image on my Arduino. The only thing I've found is : http://arduino.cc/en/Reference/TFTLoadImage which forces us to use a SD card.

The "GetPixel()" function that I need will be for an Image (PImage) which return his RGB value and maybe an other function for the pixel position X and Y

Well, the first thing is to load an image on my Arduino.

And that is when you find that most Arduinos have only 2K of memory for everything including any image.

What Arduino do you have?

I have an Arduino Uno but my .png is a 8x8 pixel actually (225 octets)

I have an Arduino Uno but my .png is a 8x8 pixel actually

So, do you know how to get data for a specific pixel from a png file?

Nope, and this is the point ! It's obvious on Processing but on Arduino I can't find any hint about this but SD card image loading...

http://www.fileformat.info/format/png/corion.htm

but my .png is a 8x8 pixel actually (225 octets)

8x8x3 = 192

AWOL:
http://www.fileformat.info/format/png/corion.htm

but my .png is a 8x8 pixel actually (225 octets)

8x8x3 = 192

Oh well, you might right but I said just this because of my folder information (you can see the screen down my post)

Well I just made an 8 by 8 png file and it takes up 7K.
Here it is attached.

pling.png

Nope, and this is the point !

So, you want to use an image format that you haven't a clue how to read.

It's obvious on Processing

that someone who DID understand the image format was able to write a function to extract data from it.

but on Arduino I can't find any hint about this

Because the Arduino has no place to display an image. Why should there be functions and methods to deal with image data when it does not have image display capabilities.

Get yourself over to Google (or whatever search engine you like) and learn how to access the image data in a png file.