Page 1 of 1
MPO format (3D)
Posted: 2010-05-24T06:09:14-07:00
by matamouros
Greetings,
Anyone out there using MPO for 3D images? I need a command line *nix tool to process this (at least to transcode it to some kind of workable format), but I'm not finding anything... Anyone has the same problem? Any plans for ImageMagick to support this? This is the spec, BTW:
http://www.cipa.jp/english/hyoujunka/ki ... -007_E.pdf
Thanks in advance.
Pedro.
Re: MPO format (3D)
Posted: 2010-05-24T06:26:08-07:00
by magick
We have no plans to support the MPO image format. However, ImageMagick is open-source so anyone can write a coder to read and/or write an image format and contribute it to the ImageMagick project.
Re: MPO format (3D)
Posted: 2010-07-22T18:53:47-07:00
by Bill.Costa
I'm also interested in using MPO files in ImageMagick and am a programmer by profession. Can you point me to documentation that provides guidelines for creating a "coder" module?
Re: MPO format (3D)
Posted: 2010-07-22T19:08:12-07:00
by fmw42
I am not an expert on coding, but you could look at:
http://www.imagemagick.org/script/archi ... php#coders
and
viewtopic.php?f=4&t=11884
until someone with more IM coding knowledge than I responds.
Re: MPO format (3D)
Posted: 2010-11-02T22:25:52-07:00
by sanmai
To those who interested, exiftool can be used to extract pairs from the .MPO:
Code: Select all
exiftool -trailer:all= input.mpo -o R.jpg
exiftool input.mpo -mpimage2 -b > L.jpg
And then:
Code: Select all
composite -stereo L.jpg R.jpg stereo.jpg
via
brainwagon.org
Re: MPO format (3D)
Posted: 2013-10-10T15:49:41-07:00
by Aplonis
Here's what I wrote for myself to use with my FujiFilm FinePix W3 camera.
It's a Perl script requireing no modules to be isntalled, but calling both ExifTool and ImageMagick in turn to generate full-color, full-size, cross-eye stereographs in JPEG format from a whole directory of MPOs. Use at own risk.
Code: Select all
#!/usr/bin/perl -w
# Version 2013-10-11 by Gan Uesli Starling
# A program to separate MPO files into cross-eye stereo pairs.
# Requires both ExifTool and ImageMagick to be installed in system.
# Offered without warrantee or guarantee of any kind whatsoever. Use at own risk.
# Get a list of all *.MPO files, then split & rejoin each one.
sub parse_files {
my ($dir, $re_hunt, $geometry) = @_;
my @file_list = hunt_files($dir, $re_hunt);
for my $mpo (@file_list) {
for ( "R.jpg", "L.jpg") {unlink $_};
my $stereo = 'X_' . $mpo;
$stereo =~ s{\.(mpo|MPO)$}{.jpg};
print "Splitting $mpo\n";
system("exiftool -trailer:all= $mpo -o ./R.jpg");
system("exiftool $mpo -mpimage2 -b > ./L.jpg");
system("montage -tile 2x0 -geometry $geometry R.jpg L.jpg $stereo");
#last;
}
}
# Return a lists of files from path that match a RegEx.
sub hunt_files {
my ($path, $re) = @_;
my @list;
opendir ( my $dh, $path ) || die "Error in opening dir $path\n";
while( (my $file = readdir( $dh ))){
push @list, $file if $file =~ m/$re/;
}
closedir($dh);
return @list;
}
parse_files('./', '^.*.(mpo|MPO)$', '3584x2016');
print "All done!\n";
sleep 5;