I have a scanner that is generating a sequence of motion picture monochrome images of the RGB information is this order
image0.bmp red
image1.bmp green
image2.bmp blue
image3.bmp red
ect..
Is there a way with the comand line to combine a batch of these files within a range so it will start with every third image without writing out every frame number?
Thanks,
Simon
combine multible images
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: combine multible images
lundsimon wrote:I have a scanner that is generating a sequence of motion picture monochrome images of the RGB information is this order
image0.bmp red
image1.bmp green
image2.bmp blue
image3.bmp red
ect..
Is there a way with the comand line to combine a batch of these files within a range so it will start with every third image without writing out every frame number?
Thanks,
Simon
What do you mean by combine?
I suspect that you will likely need to write a script to loop over your images and select every 3rd one. What platform are you on?
Re: combine multible images
By using this command:
convert image0.bmp image1.bmp image2.bmp -channel RGB \
-combine imagecopy.bmp
I can make a color image out of the monochrome files, I am using windows XP.
S.
convert image0.bmp image1.bmp image2.bmp -channel RGB \
-combine imagecopy.bmp
I can make a color image out of the monochrome files, I am using windows XP.
S.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: combine multible images
you will likely need a batch script file to loop over your images and some help from one of the Windows users.
Re: combine multible images
The batch scrip was a good hint, this could be streamlined but it works. i is the first frame, title is the file name and the LEQ value is the last frame to be combined.
Thanks,
Simon
@echo off
set i=0
set title=test
set plus=1
set /a one=%i%+%plus%
set /a two=%one%+%plus%
set three=3
set count=0
set plus=1
:startloop
@echo on
convert %title%%i%.bmp %title%%one%.bmp %title%%two%.bmp -channel RGB -combine -negate %title%rgb%count%.bmp
@echo off
set /a i="%i%+%three%"
set /a one="%one%+%three%"
set /a two="%two%+%three%"
set /a count="%count%+%plus%"
if %i% LEQ 2 goto :startloop
echo done
Thanks,
Simon
@echo off
set i=0
set title=test
set plus=1
set /a one=%i%+%plus%
set /a two=%one%+%plus%
set three=3
set count=0
set plus=1
:startloop
@echo on
convert %title%%i%.bmp %title%%one%.bmp %title%%two%.bmp -channel RGB -combine -negate %title%rgb%count%.bmp
@echo off
set /a i="%i%+%three%"
set /a one="%one%+%three%"
set /a two="%two%+%three%"
set /a count="%count%+%plus%"
if %i% LEQ 2 goto :startloop
echo done