Hi,
I'm looking for some help in selecting an application or fast language to manipulate pixels in a number of specific images described below.
The images are very large (3264x2448px or more) and in RAW format so processing speed will probably be a priority. To add difficulty to the situation the images will be taken with different makes or models of camera and thus have different RAW formats. So it may be necessary to first convert the RAW files to a lossless format such as Tiff or PNG but I'm not sure if this will be necessary as there may be some way to do what I want on the RAW files.
To describe the images simply, they're essentially a number of vertical lines that have undergone some colour dispersion due to the lighting & optics.
Looking at 1 row of pixels, there would be some darkish space followed by 3 colour spots (r-g-b) and then some more darkish space and then another group of spots. This would continue right across the row. The separation of colour of the spots would depend upon the dispersion; the width of the spots would be say 5-50 px (line width); and the intensity or brightness of the spots would depend on the colour & brightness of the line.
Example:
....................|..............................................................**........................................................................................................
....................|............................................................*....**....................................................................................................
....................|..........................................................*..............................................................................................................
....................|..........................................................................................................................................................................
....................|..........................................................................................................................................................................
....................|..............................*......................................*..................................................................................................
....................|..........................**..***..................*................................................................................................................
....................|........................*................................................................................................................................................
....................|............................................................................................................*............................................................
....................|......................*..................................................................................................................................................
Intensity |......................................*................................*................................*..**........................................................
....................|....................................................*..........................................................*........................................................
....................|..........................................................................................................................................................................
....................|....................*..................................................................................*..........*....................................................
....................|..........................................................................*..............................................................................................
....................|..........................................................................................................................................................................
....................|........................................*............*................................*................................................................................
....................|....................*................................................................................................*..................................................
....................|....*....................................................................*..............................................................................................
....................|..........................................*........*................................................*................*....*............*............................
....................|**..*******........................****........................******..******....................**..******..****....................
....................|_____________________________________________________________________________________
....................Row-->................r.............................g............................................b.........................noise
.....................These r-g-b peaks may overlap, depending on the amount of dispersion.
.........................A similar spectrum is repeated many times across the whole Row.
My aim is to correct for this dispersion so I would need an application or language that will be capable of separating the r-g-b channels (if converted to Tiff or PNG), and then on each channel:
1) Do a 3 or 5 point smooth across each Row to reduce noise.
2) Find the leading & trailing edges of each (r,g or b) spot and calculate its centre Row number.
3) Find the intensities of each (r,g or b) spot at their centre Row that's found in step 2.
4) Determine the separation for each of the r-g-b spots.
From these results I can calculate a correction algorithm.
NOTE: As the dispersion is not the same across the image, I'll need to adjust each spot separately.
This process will be used for calibration of a lighting & optics setup. In some instances it may also need to be repeated with horizontal lines but I can simple change Rows to Columns for those cases.
In the past I've worked extensively with Fortran IV in the 1960's, some Basic & a little assembler, & lately with a little VBA, but I'm a complete novice at image manipulation at the pixel level so would really appreciate any help with direction in this area. I'm willing to learn a new language if necessary but hope there's already some aps or libraries that already contain the basic steps needed for this task as well as some tutorials of how to use them.
Thanking you,
inventiveman