View Single Post
  #5   Spotlight this post!  
Unread 16-01-2012, 00:53
JewishDan18's Avatar
JewishDan18 JewishDan18 is offline
Registered User
FRC #1700
Team Role: Engineer
 
Join Date: Feb 2009
Rookie Year: 2007
Location: Sunnyvale, CA
Posts: 185
JewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to behold
Re: Java image processing - accessing pixel data

Quote:
Originally Posted by davidthefat View Post
It is possible to do it. The Image class has a pointer to the jpeg image in memory named "Image". It is a public field and did not catch that it was there the first 2 years. You just decode that data into raw bytes and then you can access as you want to as "pixels".
This is far, far easier said than done. A jpeg image is by its nature compressed. To access the data, you would need to decompress it, which would take a very long time to do. Instead of only accessing the pixels you need, you would have to access all of them. You can read a little more about it here

https://en.wikipedia.org/wiki/JPEG