Search found 31 matches

by newbie1
2012-08-14T00:42:45-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

It works now. #!/bin/sh value=`compare -metric AE -fuzz 10% 2.jpg 5.jpg null: 2>&1` test=`convert xc: -format "%[fx:$value<420000?1:0]" info:` if [ $test -eq 1 ]; then convert 4.jpg oldid.jpg else convert 4.jpg newid.jpg fi Now, i know that because using -subimage-search makes it slower. Thank You! :D
by newbie1
2012-08-13T19:40:53-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

What is the error message when running the script? I suspect the sed command is likely not doing the right thing, because the output from compare is now different. compare -metric rmse rose: \( -size 70x46 xc:red \) null: 28533 (0.435386) But compare -metric NCC rose: \( -size 70x46 xc:red \) null:...
by newbie1
2012-08-13T19:34:03-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

Ther is error mesage is:

Code: Select all

convert: missing expression `' @ error/fx.c/FxEvaluateSubexpression/2111.
/home/user/123/test1.sh: 4: [: -eq: unexpected operator
But there is still a output and the output is awalys newid.jpg which is in the else statement.
by newbie1
2012-08-13T18:42:54-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

After testing out different error measure, i realised that the script take too long to finish is because of "-subimage-search". So, i took out "-subimage-search", but after tooking it out, there an error that say the width and height of the small and large image is different. Then, I use the OldID a...
by newbie1
2012-08-12T22:04:34-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

Finally it works! I updates my imagemagick to the latest version. The script is: #!/bin/sh value=`compare -metric rmse -subimage-search 2.jpg 1.jpg null: 2>&1 | sed -n 's/^.*(\(.*\)).*$/\1/p'` test=`convert xc: -format "%[fx:$value<0.022?1:0]" info:` if [ $test -eq 1 ]; then convert 4.jpg oldid.jpg ...
by newbie1
2012-08-12T20:42:47-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

I don't think i can install the lastest version as my ubuntu synaptic latest version is 6.6.9-7
by newbie1
2012-08-12T20:13:38-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

The latest is 6.7.8.10 should i install that?
by newbie1
2012-08-12T20:10:55-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

It get me to the man pages for sed.

I think it really is my version of imagemagick. So, i will now update to version 6.7.8
by newbie1
2012-08-12T20:01:54-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

Should i upgrade my imgaemgaick to version 6.7.8?
by newbie1
2012-08-12T19:56:52-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

value=`compare -metric rmse -subimage-search rose: xc:red null: 2>&1 | sed -n 's/^.*(\(.*\)).*$/\1/p'`
echo "$value"

It does not return anything.
by newbie1
2012-08-12T19:39:51-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

The version im using is:
Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

The command works and this is the result:

Code: Select all

567.383 (0.00865772) @ 0,0
by newbie1
2012-08-12T19:31:42-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

This is the output:

Code: Select all

compare: images too dissimilar `ROSE' @ error/compare.c/CompareImageCommand/948.
by newbie1
2012-08-12T19:23:13-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

Ok, i think there a problem with the first simple command. When i tried out this: compare -subimage-search -metric rmse newID.jpg student.jpg result.jpg I was using windows and it works. But when i tried it out on my Ubuntu, the command line is also stuck. http://i46.tinypic.com/14142ls.jpg I think ...
by newbie1
2012-08-12T19:15:44-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

Unfortunately, after changing it, it still cannot work. #!/bin/sh threshold=0.022 value=`compare -metric rmse -subimage-search 2.jpg 1.jpg null: 2>&1 | sed -n 's/^.*(\(.*\)).*$/\1/p'` test=`convert xc: -format "%[fx:$value<threshold?1:0]" info:` if [ $test -eq 1 ]; then convert 4.jpg oldid.jpg else ...
by newbie1
2012-08-12T19:09:56-07:00
Forum: Users
Topic: [HELP] Autocrop batch on photo ID
Replies: 63
Views: 73979

Re: [HELP] Autocrop batch on photo ID

It still cannot work. I did what you say and change it to: #!/bin/sh value=`compare -metric rmse -subimage-search 2.jpg 1.jpg null: 2>&1 | sed -n 's/^.*(\(.*\)).*$/\1/p'` test=`convert xc: -format "%[fx:$value<0.022?1:0]" info:' if [ $test -eq 1]; then convert 4.jpg oldid.jpg else convert 4.jpg newi...