This post is only a part of a broader analysis that I am performing on the image processing speed, but I think it's interesting in itself. I will post more in the next days. Now the problem is: I have a lot of images like this one
and I want straighten each of them. Obiously the rotation angle is not the same for all picture. To choose the correct one I have tried this:
numberFormat[arg_] := NumberForm[arg, {3, 3}, NumberSigns -> {"+", "-"}];
file = "c:\\degiorgi\\002\\z001.bmp";
img = Import[file, "BMP"];
Manipulate[
ImageRotate[img, -t],
Control[{{t, 0, Dynamic[numberFormat[t]]}, 0, 1, .1,
ControlType -> Slider}]
]
It works fine on little test images but grows deadly slow as image size increases and even to move the slider become practically impossibile. The same holds for
file = "c:\\degiorgi\\002\\z001.bmp";
img = Import[file, "BMP"];
r = Table[a, {a, 0, .5, .001}];
Manipulate[
ImageRotate[img, -t]
, Control[{t, r, ControlType -> PopupMenu}]
]
What am I doing wrong ? I think that all this is not affected by the machine performance because other image processing software, and vector drawing also, run fast.
In this specific case a possible workaround could be to process only the upper part of the image, but the main problem endures.



