Convert a textfile to an image, HELP!
Posted by Liisa Palomaa on
URL: http://imagej.273.s1.nabble.com/Convert-a-textfile-to-an-image-HELP-tp3701578.html
Hi...
I need some help! I wonder if anyone knows if it is possible to
convert textfiles to images in ImageJ. Is there any macros or plugins?
I am scanning boards and need to do some image processing. The
testtextfiles have numbers between 0 and 255 (8bits). I also want to
do some imageprocessing to the images. I need to do following steps:
1. Read a single textfile (size 10*250) and convert to image
2. Read another textfile (size 3*30) and convert to image
3. Match image 1 and image 2. Resize to a special size (20*500).
4. Take the images from step 3 and combine as channels in a single
image. (Maybe I need to do this and the last step in Photoshop)
5. Read in RGB data from RGB images (for the same board that the
textfiles are from) and create a image and merge to a final image.
(The T2 sensor takes a photo of a laser spot in black and white. Then it
does some processing to determine grain angle and dive angle. The
textfiles in step 1 and 2)
(The RGB camera takes a colour photo of a small section of board. These
photos can be stitched together to provide a picture of the whole
board. The RGB image in step 5)
The textfiles can for example look like this
1 0 22 159 99 22 29 141 95 86 4 30 81 29
1 1 89 301 273 12 22 25 295 271 29 30 147 26
1 2 95 307 269 11 29 23 283 263 29 30 149 18
1 3 85 285 250 22 29 2 267 242 13 30 133 7
1 4 83 259 225 24 29 3 244 218 14 30 133 10
1 5 87 233 200 18 29 3 218 194 12 30 135 6
1 6 88 209 178 17 29 6 195 172 17 30 137 8
1 7 89 190 158 16 29 179 174 153 10 30 134 0
1 8 88 182 141 16 29 4 152 136 13 30 136 6
I will need to convert the two last columns to an image...
I will scan a lot of boards and need a fast way to convert the
textfiles to images- so it would be a good solution to have a macro or
plugin.
Thanks
//Liisa