Is Batch Straighten sheet music image files not possible in cs2?

Posted By
Dec 27, 2005
Views
415
Replies
12
Status
Closed
I have an ongoing need to straighten sheet music images in pdf and png files. I can switch between the two formats easily, so that is not a problem. I need to assure that at least one set of staff lines is horizontally straight in each of hundreds of whole page images.

For all my attempts, I have about come to the conclusion that Adobe Photoshop cs2 simply cannot do this in batch mode. As a final measure, I’d like to ask the more experienced folks if this is indeed the case.

The crop and straighten tool doesn’t seem to support whole page mode in a batch operation. Holding the Alt key down while *manually* selecting the crop and straighten procedure does seem to work for a whole page; but I don’t see any way to embed the Alt key in the action. I think it just finds the first image and uses the straighten function to correct the whole page based on that. That would be ok, though, if only I could do this for a batch of files.

Is there possibly a way to reconstruct the individual straightened images, resulting from the crop and straighten, so that the whole page is recovered in an overall straightened form? I would then need to get rid of all of the intermediate images, and save only the straighted composite image, somehow.

For all the power Adobe Photoshop cs2 seems to have, it just seems like this is something that would be within it’s realm of features. It just doesn’t seem so, for now. If you know how to do this, would you mind telling me how it could be done? Thank you.

-Friend-

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

H
Husky
Dec 27, 2005
On Tue, 27 Dec 2005 06:19:05 -0800, friend wrote:

I have an ongoing need to straighten sheet music images in pdf and png files. I can switch between the two formats easily, so that is not a problem. I need to assure that at least one set of staff lines is horizontally straight in each of hundreds of whole page images.

Couple Ideas, a template that’s already straight.
Or the transform for entire page.
Guide lines to define horizontal plane.

more pix @ http://members.toast.net/cbminfo/index.html
HL
Harry Limey
Dec 27, 2005
<friend> wrote in message
I have an ongoing need to straighten sheet music images in pdf and png files. I can switch between the two formats easily, so that is not a problem. I need to assure that at least one set of staff lines is horizontally straight in each of hundreds of whole page images.
For all my attempts, I have about come to the conclusion that Adobe Photoshop cs2 simply cannot do this in batch mode. As a final measure, I’d like to ask the more experienced folks if this is indeed the case.

The crop and straighten tool doesn’t seem to support whole page mode in a batch operation. Holding the Alt key down while *manually* selecting the crop and straighten procedure does seem to work for a whole page; but I don’t see any way to embed the Alt key in the action. I think it just finds the first image and uses the straighten function to correct the whole page based on that. That would be ok, though, if only I could do this for a batch of files.

Is there possibly a way to reconstruct the individual straightened images, resulting from the crop and straighten, so that the whole page is recovered in an overall straightened form? I would then need to get rid of all of the intermediate images, and save only the straighted composite image, somehow.

For all the power Adobe Photoshop cs2 seems to have, it just seems like this is something that would be within it’s realm of features. It just doesn’t seem so, for now. If you know how to do this, would you mind telling me how it could be done? Thank you.

-Friend-
I have CS1 so not sure quite what you are doing, but could you do this operation with 2 batch files?
Assuming the images all need straightening to the same degree!! you could have one action that uses the measure tool, and another to crop the resultant images?
Dec 28, 2005
On Tue, 27 Dec 2005 09:41:36 -0500, Husky
wrote:

On Tue, 27 Dec 2005 06:19:05 -0800, friend wrote:

I have an ongoing need to straighten sheet music images in pdf and png files. I can switch between the two formats easily, so that is not a problem. I need to assure that at least one set of staff lines is horizontally straight in each of hundreds of whole page images.

Couple Ideas, a template that’s already straight.
Or the transform for entire page.
Guide lines to define horizontal plane.

Since some of the source images are from my scanner, and some of them are from the net, the image orientation is not consistent. Usually, the angle from horizontal is less than about 2 degrees, but varies page by page.

I don’t see how a template could work in this case. The idea sounds interesting, if I understand what you are suggesting. I guess the idea would be to take a straight line from a template, and somehow determine how the source image is offset from that. using the resulting angle as the rotation amount. Could you give me a little more detail on how that would actually be implemented?

Thanks.
Dec 28, 2005
On Tue, 27 Dec 2005 17:19:25 -0000, "Harry Limey" <harrylimey(at)Lycos.co.uk> wrote:

<friend> wrote in message
I have an ongoing need to straighten sheet music images in pdf and png files. I can switch between the two formats easily, so that is not a problem. I need to assure that at least one set of staff lines is horizontally straight in each of hundreds of whole page images.
For all my attempts, I have about come to the conclusion that Adobe Photoshop cs2 simply cannot do this in batch mode. As a final measure, I’d like to ask the more experienced folks if this is indeed the case.

The crop and straighten tool doesn’t seem to support whole page mode in a batch operation. Holding the Alt key down while *manually* selecting the crop and straighten procedure does seem to work for a whole page; but I don’t see any way to embed the Alt key in the action. I think it just finds the first image and uses the straighten function to correct the whole page based on that. That would be ok, though, if only I could do this for a batch of files.

Is there possibly a way to reconstruct the individual straightened images, resulting from the crop and straighten, so that the whole page is recovered in an overall straightened form? I would then need to get rid of all of the intermediate images, and save only the straighted composite image, somehow.

For all the power Adobe Photoshop cs2 seems to have, it just seems like this is something that would be within it’s realm of features. It just doesn’t seem so, for now. If you know how to do this, would you mind telling me how it could be done? Thank you.

-Friend-
I have CS1 so not sure quite what you are doing, but could you do this operation with 2 batch files?
Assuming the images all need straightening to the same degree!! you could have one action that uses the measure tool, and another to crop the resultant images?

I mentioned in another post that some of the source images are from my scanner, and others from the net. Typically they are around +/- 2 degrees from horizontal, and each page is different. So, there is no way to know what the rotational offset angle is, short of measuring it. This is why I have doubts about batch mode being successful in this application.

One suggestion was to use a template as a reference, but I don’t understand how to implement that. Do you have any ideas?

Thanks
H
Husky
Dec 28, 2005
On Wed, 28 Dec 2005 04:31:07 -0800, friend wrote:

Couple Ideas, a template that’s already straight.
Or the transform for entire page.
Guide lines to define horizontal plane.

Since some of the source images are from my scanner, and some of them are from the net, the image orientation is not consistent. Usually, the angle from horizontal is less than about 2 degrees, but varies page by page.

I don’t see how a template could work in this case. The idea sounds interesting, if I understand what you are suggesting. I guess the idea would be to take a straight line from a template, and somehow determine how the source image is offset from that. using the resulting angle as the rotation amount. Could you give me a little more detail on how that would actually be implemented?
you didn’t provide a lot of info for an exact solution which is why I said template. You create a template, and use the same template for every pix you create after that. Ever see those preview homemade pix with the exact same banner somewhere on the page, you can flip from one to the next, and with everything else consistent, the only thing that changes is what wasn’t in the template he used.

Since you’re talking about different sources, batch handling is out of the question. You’ll need to adjust each separately.

HOWTO:

1 load image with RULER on, pull a guide line down and from the left 2 CTRL A select image
3 CTRL T Free Transform.
4 there’s a little ramp tool at the top now. in the box it may be empty. enter a number and with the mouse wheel, turn the ramp numbers until the image is straight.
5 hit enter
6 CTRL S save file
7 CTRL W close file.
8 repeat for all files.

If you know of a way for #4 above to see just how out of whack the pix is, then you can go with batch.
or you could just build an action with the steps above, and use hand adjust on item #4, and the action should handle all the rest.

I don’t know if you can use a batch droplet. I’ve never used a hand adjust in a droplet. Just seemed to be more trouble to create a droplet than just do it by action.


more pix @ http://members.toast.net/cbminfo/index.html
HL
Harry Limey
Dec 28, 2005
"Husky" wrote in message

HOWTO:

4 there’s a little ramp tool at the top now. in the box it may be empty. enter a number and with the mouse wheel, turn the ramp numbers until the image is straight.

Husky – there is a simpler way to level a picture! especially one with lines already on it which need to be level!
If you go to the eyedrop tool – expand it and select the measure tool, then draw a line out with the measure tool along one of the musical lines so that they are parallel, then go to image – rotate canvas – arbitrary – you will find the PS has already defined the degree of alteration required, accept that and click on OK.
N
nomail
Dec 28, 2005
"Harry Limey" <harrylimey(at)Lycos.co.uk> wrote:

Husky – there is a simpler way to level a picture! especially one with lines already on it which need to be level!
If you go to the eyedrop tool – expand it and select the measure tool, then draw a line out with the measure tool along one of the musical lines so that they are parallel, then go to image – rotate canvas – arbitrary – you will find the PS has already defined the degree of alteration required, accept that and click on OK.

And just how would that work in batch if each image needs a different rotation?…


Johan W. Elzenga johan<<at>>johanfoto.nl Editor / Photographer http://www.johanfoto.nl/
HL
Harry Limey
Dec 28, 2005
"Johan W. Elzenga" wrote in message

And just how would that work in batch if each image needs a different rotation?…

It has already been concluded that batch handling would not work! unless of course you have an answer?
H
Husky
Dec 28, 2005
On Wed, 28 Dec 2005 17:06:52 -0000, "Harry Limey" <harrylimey(at)Lycos.co.uk> wrote:

"Husky" wrote in message

HOWTO:

4 there’s a little ramp tool at the top now. in the box it may be empty. enter a number and with the mouse wheel, turn the ramp numbers until the image is straight.

Husky – there is a simpler way to level a picture! especially one with lines already on it which need to be level!
If you go to the eyedrop tool – expand it and select the measure tool, then draw a line out with the measure tool along one of the musical lines so that they are parallel, then go to image – rotate canvas – arbitrary – you will find the PS has already defined the degree of alteration required, accept that and click on OK.

I didn’t know that, now there’s a way to fix it faster… —
more pix @ http://members.toast.net/cbminfo/index.html
H
Husky
Dec 28, 2005
On Wed, 28 Dec 2005 17:32:36 -0000, "Harry Limey" <harrylimey(at)Lycos.co.uk> wrote:

"Johan W. Elzenga" wrote in message

And just how would that work in batch if each image needs a different rotation?…

It has already been concluded that batch handling would not work! unless of course you have an answer?

Well the way I said by 1st creating an action. then setting item #4 the physical adjustment to a pause action [or whatever it’s called]. Then do the adjustment, hit enter, and finish each step of the action.
Whether that also works in a droplet I have no idea. Never made an action with a pause needed into a droplet. Haven’t made many droplets at all.

more pix @ http://members.toast.net/cbminfo/index.html
Dec 28, 2005
On Wed, 28 Dec 2005 17:06:52 -0000, "Harry Limey" <harrylimey(at)Lycos.co.uk> wrote:

"Husky" wrote in message

HOWTO:

4 there’s a little ramp tool at the top now. in the box it may be empty. enter a number and with the mouse wheel, turn the ramp numbers until the image is straight.

Husky – there is a simpler way to level a picture! especially one with lines already on it which need to be level!
If you go to the eyedrop tool – expand it and select the measure tool, then draw a line out with the measure tool along one of the musical lines so that they are parallel, then go to image – rotate canvas – arbitrary – you will find the PS has already defined the degree of alteration required, accept that and click on OK.

This is precisely the way I have been doing it. Well, actually, I use the tool in parallel to a line only in the sense that it actually overlays the line! That is the best way to know that you are indeed on the line.

There are plenty of horizontal lines in sheet music. It just seems unfortunate that there isn’t some trick way to identify one of the many staff lines in an image to use as a basis for straightening the image in total — which would then be something that could be done in a batch process..
D
dvus
Dec 29, 2005
friend wrote:
On Wed, 28 Dec 2005 17:06:52 -0000, "Harry Limey" <harrylimey(at)Lycos.co.uk> wrote:

"Husky" wrote in message

HOWTO:

4 there’s a little ramp tool at the top now. in the box it may be empty. enter a number and with the mouse wheel, turn the ramp numbers until the image is straight.

Husky – there is a simpler way to level a picture! especially one with lines already on it which need to be level!
If you go to the eyedrop tool – expand it and select the measure tool, then draw a line out with the measure tool along one of the musical lines so that they are parallel, then go to image – rotate canvas – arbitrary – you will find the PS has already defined the degree of alteration required, accept that and click on OK.

This is precisely the way I have been doing it. Well, actually, I use the tool in parallel to a line only in the sense that it actually overlays the line! That is the best way to know that you are indeed on the line.

There are plenty of horizontal lines in sheet music. It just seems unfortunate that there isn’t some trick way to identify one of the many staff lines in an image to use as a basis for straightening the image in total — which would then be something that could be done in a batch process..

It would seem that since the images contain only a "picture" of a straight line that there wouldn’t be any way to identify how far from horizontal (or vertical) *anything* is. If it were a vectorized image there might be a way to find an angle, but a rasterized image has no such information I’m aware of. I’d be interested if someone could correct me on this.


dvus

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

Related Discussion Topics

Nice and short text about related topics in discussion sections