I need to convert an RGB raw file into 3 files containing each the red, green and blue channel. I have not been able to find a UNIX command line to help me with this task.
Have you tried the netpbm tools? This will work with R8G8B8 and other 8-bit RGB orders.
For a width 100 height 200 RGB order raw file:
You will now have 3
if you really want the raw channels like that. Or, for further processing:
You now have three
Check that the
and R/G/B will be written to
|show 2 more comments|
With ksh93, you can do:
(yes, I know, there's no
With only standard Unix tools, you can do:
Those would split a
You can also do channel separation using MATLAB. Read this: http://blogs.mathworks.com/steve/2011/03/08/tips-for-reading-a-camera-raw-file-into-matlab/ this shows how to read RAW data. Separating channels in MATLAB is easy, like sampling some elements in matrix.