Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
But there is still a output and the output is awalys newid.jpg which is in the else statement.
See my note above. It is failing because the sed is not getting data it expects. Thus the test fails because there is no value produced from sed and so you always get the "else" condition.
This does not look right. I would expect some difference. But only one value in the range 0 to 1. I suspect one gets zero here because there is not one single pixel in the rose image that is exactly red.
This gives a perfect match thought there is some precision issue that cause the result to be slightly larger than 1.
This is only giving the raw counts. This is probably correct with only one value. It is not normalized and so is going to be image size dependent, unless you divide by the total pixels in the image.
You have to understand that different error measure produce different output. So sed is not finding any parenthesis to locate the value in the parenthesis.
For these measures, just take out the sed command.
What are your exact commands. If you are using AE or some other measure, you will not be able to use the same threshold. Each measure will need a different calibration of the threshold value.