Can ImageMagick divide an image into odd-line and even-line image files (interlaced) ?
Background
----------------
Basically I want to created odd and even interlace fields from a single image for the purpose of testing encoding techniques, encoding each field separately, then software deinterlacing to recombine the odd/even fields for subjective quality analysis of camera video. I want to decode and put the two fields back together and compare quality to the original. I could write a utility to split an image pretty quickly but every time I think about doing this I learn that ImageMagick already does this.
Thanks in advance for any examples or direction,
-Ed
PS: I apologize if this appeared twice. I was having trouble joining the mailing list and then I re-discovered this server.
Dividing bitmap in two; odd / even line (interlaced) images?
Re: Dividing bitmap in two; odd / even line (interlaced) ima
Not sure if ImageMagick has some simple options for handling interlaced video frames. (Probably not?)
A workaround for just extracting the two fields would be (example with a 720x576 PAL frame):(Of course, one could make a script that works for all input files.)
A workaround for just extracting the two fields would be (example with a 720x576 PAL frame):
Code: Select all
convert frame.png -depth 8 rgb:- | convert -depth 8 -size 1440x288 rgb:- -crop 50%x100%+0+0 +repage even.png
convert frame.png -depth 8 rgb:- | convert -depth 8 -size 1440x288 rgb:- -gravity northeast -crop 50%x100%+0+0 +repage odd.png
Re: Dividing bitmap in two; odd / even line (interlaced) ima
Excellent! Thank you very much for the examples!
-Ed
-Ed
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Dividing bitmap in two; odd / even line (interlaced) ima
A tricky solution but if you followed the link provided, the better way was a image operation to just ignore every second line... EG use -sample 100x50%\!
If you want the other half, roll the image by one pixel first.
I repeat the link again...
IM Examples, Video Handling, Deinterlacing
http://www.imagemagick.org/Usage/video/#deinterlace
If you want the other half, roll the image by one pixel first.
I repeat the link again...
IM Examples, Video Handling, Deinterlacing
http://www.imagemagick.org/Usage/video/#deinterlace
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Dividing bitmap in two; odd / even line (interlaced) ima
Thanks. I will revisit that page again and try to make sense of it.
Thanks again,
-Ed
Thanks again,
-Ed