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

Discussion in 'Photoshop' started by friend, Dec 27, 2005.

  1. friend

    friend Guest

    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, Dec 27, 2005
    1. Advertisements

  2. friend

    Husky Guest

    Couple Ideas, a template that's already straight.
    Or the transform for entire page.
    Guide lines to define horizontal plane.
    Husky, Dec 27, 2005
    1. Advertisements

  3. friend

    Harry Limey Guest

    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?
    Harry Limey, Dec 27, 2005
  4. friend

    friend Guest

    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?

    friend, Dec 28, 2005
  5. friend

    friend Guest

    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?

    friend, Dec 28, 2005
  6. friend

    Husky Guest

    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 everypix 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 iswhat 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.


    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.
    Husky, Dec 28, 2005
  7. friend

    Harry Limey Guest


    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.
    Harry Limey, Dec 28, 2005
  8. And just how would that work in batch if each image needs a different
    Johan W. Elzenga, Dec 28, 2005
  9. friend

    Harry Limey Guest

    It has already been concluded that batch handling would not work! unless of
    course you have an answer?
    Harry Limey, Dec 28, 2005
  10. friend

    Husky Guest

    I didn't know that, now there's a way to fix it faster...
    Husky, Dec 28, 2005
  11. friend

    Husky Guest

    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 actionwith a pause needed into a droplet. Haven't made many droplets at all.
    Husky, Dec 28, 2005
  12. friend

    friend Guest

    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..
    friend, Dec 28, 2005
  13. friend

    dvus Guest

    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, Dec 29, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.