Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Image encoding...

Status
Not open for further replies.

boscoe

Member
Okay so I'm interested if any one could help me directly or point me in the direction of some existing projects that could help.

In my project I'm interested in creating a film negative scanner using the Toshiba TCD1304 linear sensor IC. It's quite simple how it works, you clock it and it gives you a waveform output effectively representing the amount of light entering each cell. I will need to add an ADC to this output and then I can create an 8bit data output for each pixel, then I have a string of these bytes for each line of the scan. I then add these lines up to create the image. My question is how I go about encoding this data into a useful file type preferably using a micro controller and an SD card. Any of the popular image file types would work for me but .tif is preferable.

Thanks for the help
Boscoe
 

moffy

Member
Use a Raspberry PI as your controller and you have all the wealth of linux and its utilities available. I can't believe how often I am recommending the Raspberry PI!
 

ronsimpson

Well-Known Member
Most Helpful Member
Do you need color?
Your picture size is 3648 wide and maybe 3648 high. (and 3x times that for color)
What is 3648 X 3648 X 3=?
 

ronsimpson

Well-Known Member
Most Helpful Member
Raspberry PI and Beagle Bone Black are both options.
There are many comparisons on the net.
The PI has a better real time video engine. The BBB has more "horse power" and I/O.
 

boscoe

Member
Thanks for the help guys. The image will actually be slightly smaller than the scanner element, so about 3000px wide and 4500px long. I could have a play with the raspberry pi to get things going and learn however I want a much more tailored solution in the end.

I don't really understand the tiff encoding right now but also haven't read much. I am currently going through the rest of my exams; once I have finished I will be spending more time on this project.
 

ClydeCrashKop

Well-Known Member
Most Helpful Member
If you are just doing gray scale, bitmaps are just rows of one byte pixels after you get past the 1024 byte header. Make a 3000 wide X 4500 gray scale .BMP file and use it as a template. Check the format, I think the bottom left pixel is the first one past the header.
 

heydonms

Member
An SBC like the RPi or BBB doesn't seem like a great fit, if it needs to be stand alone then a mid range micro is easily up to the task. It will be faster (no boot time), smaller, use less power and be less complex. If it doesn't have to be standalone, then just use an ADC connected to USB and do it all in software on a full size PC.
 

misterT

Well-Known Member
Most Helpful Member
I would send the data to PC and convert it to whatever format the user wants. C# (.net) has good libraries to write the image in many formats.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top