Debayer

Forum covering all aspects of small gauge cinematography! This is the main discussion forum.

Moderator: Andreas Wideroe

Post Reply
MattiasN
Posts: 66
Joined: Thu Jun 13, 2013 10:57 pm
Real name: Mattias Norberg

Debayer

Post by MattiasN »

Hi hmm here is a very good debayer but it´s command line tool but i like the quality of it :)
check it out http://www.fastcompression.com/products ... ebayer.htm i use it with my GPU but it works with cpu to but not as fast

i use a free program called imagemagic that you can download here http://www.imagemagick.org/script/index.php it´s a cammand line tool also

my machine vision camera capture .bmp image sequence so i use imagemagic to convert to .pgm and then use the debayer to convert it to .ppm i have a BAT script that loop´s all the images in the image sequence
here is the script and you can see i have create a directory in c:\TEMP i use that directory only to convert .bmp to .pgm and when it have debayer it then it delete it in the script line DEL /Q "C:\Temp\*.*"

Code: Select all

SET Input_PATCH=I:\REEL2\N
SET OUTPUT_PATCH=F:\REEL2\N\ppm


SET start=1
SET end=10360




FOR /L %%i IN (%start%,1,%end%) DO (CALL :loopbody "%%i")
GOTO :eof


:loopbody
convert "%Input_PATCH%\image%1.bmp" "C:\Temp\image%1.pgm"
DebayerGPU.exe -demosaic DFPD_R -GPU -i "C:\Temp\image%1.pgm" -o "%OUTPUT_PATCH%\image%1.ppm"
DEL /Q "C:\Temp\*.*"
GOTO :eof

hmm i have a script that put together images and then debayer it and then crope the images back to orginal size but i do not know how to loop it max was 12 images in 1600x1200
this does put 12 images together

Code: Select all

convert "C:\mapp\image%%d.pgm[1-12]" -append "C:\Temp\1.pgm"

and this debayers the big image and crop it back to 12 images and in images sequense 1 to 12

Code: Select all

DebayerGPU.exe -demosaic DFPD_R -GPU -i "C:\Temp\1.pgm" -o "C:\Temp\nn166.ppm" & convert "C:\Temp\nn166.ppm" -crop 1x12@ -scene 1 "C:\Temp\nn%%d.ppm"
maby someone know how to loop that it´s faster :)
Post Reply