Search found 6 matches

by kbro
2011-06-04T05:21:40-07:00
Forum: PerlMagick
Topic: How to read IPTC keywords using PerlMagick?
Replies: 1
Views: 12178

Re: How to read IPTC keywords using PerlMagick?

This seems to work:


use Image::Magick;

foreach my $file (<@ARGV>)
{
my $image = new Image::Magick;

$image->Read($file);

my @keywords = split ';', $image->Get('IPTC:2:25');

print "$file: @keywords\n";
}

The split() is needed because multiple keywords are separated by semicolons (same as ...
by kbro
2011-06-04T05:03:52-07:00
Forum: PerlMagick
Topic: How to read IPTC keywords using PerlMagick?
Replies: 1
Views: 12178

How to read IPTC keywords using PerlMagick?

I have a set of images in a folder, and

identify -format "%f %[IPTC:2:25]" *.jpg

shows me the tags that I put into them using Picasa. I now want to extract the tags in a Perl program. I know I could use Image::IPTC, but I don't want to double-handle the file. I was hoping I could use $image->Get ...
by kbro
2011-06-02T15:10:51-07:00
Forum: PerlMagick
Topic: How to get %[fx:standard_deviation] from PerlMagick?
Replies: 2
Views: 12856

Re: How to get %[fx:standard_deviation] from PerlMagick?

I was close with my guess about calculating it from the stddev for the separate channels. It seems that if I square each stddev, add them together, divide by the number of channels, then take the square root, then I get something close to the overall stddev reported by identify.

This sorta makes ...
by kbro
2011-06-01T01:47:03-07:00
Forum: Users
Topic: How do I detect a "boring" photo?
Replies: 4
Views: 10933

Re: How do I detect a "boring" photo?

Hmmmm... looks like my use of "boring" wasn't as helpful as I'd intended. Here's what I'm really trying to do...

A photographer at an event such as motorcar rallying, BMX, horse cross-country, showjumping etc takes groups of pictures of each competitor as they pass (these are "interesting") and ...
by kbro
2011-05-31T13:58:02-07:00
Forum: Users
Topic: How do I detect a "boring" photo?
Replies: 4
Views: 10933

How do I detect a "boring" photo?

I want to separate "boring" photos from "interesting" ones in a folder. By "boring" I mean pictures of the sky, the ground, a wall, the inside of the lens cap and so on. I tried using

identify -format "%f %k\n" *.jpg
to get the number of unique colours in each image, but a number of supposedly ...
by kbro
2011-05-31T13:46:12-07:00
Forum: PerlMagick
Topic: How to get %[fx:standard_deviation] from PerlMagick?
Replies: 2
Views: 12856

How to get %[fx:standard_deviation] from PerlMagick?

I've been experimenting with commandline ImageMagick, and
identify -format "%[fx:standard_deviation]" file.jpg
tells me the value I'm interested in. However, I can't see how to get the same info from PerlMagick.
img->Fx(expression=>'standard_deviation')
doesn't do it, and
img->Statistics ...