Jump to content
You must now use your email address to sign in [click for more info] ×

Flattening crooked photos of paintings


Recommended Posts

If I took a crooked photo of a painting how do I crop and straighten it so that the painting is a perfect rectangle? The straighten tool doesn't work because that only straightens horizon lines and I don't want to crop ANY of the painting, just the space around the painting. In photoshop there was a special crop feature where you could drag the cropping corners to the corners of the painting and then hit ENTER and it would flatten, straighten out, adjust the perspective, whatever it needed to do to make it look like you actually took the photo perfectly straight on, but I can't figure out how to do that in Affinity Photo.

IMG_20180628_201943608.jpg

Link to comment
Share on other sites

There is the perspective tool that should do what you want although the mesh warp tool might be a better choice. Have a play with both to see if you can get the result you want. I would also pull some guides out to help you maintain vertical and horizontal lines, you can do this by having the select tool selected (V) and then click on the ruler area and pull in to the workspace.

1590101226_ScreenShot2019-01-08at08_09_49.png.17523632d8b0619c15e7625c4b47f9a3.png

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

asug8237...

Fixing something like this with the Perspective Tool is kind of hit and miss, but it can work. As firstdefence said, the Mesh Warp Tool is better suited to this. Be sure to set the pull down menu to "Source" before you do anything, so that you can set your corner points and then drag them to where the corners are in the picture. When you switch back to "Destination" on the menu, the mesh distorts to give you the perfect rectangle. And, because I just got a copy of ScreenFlow and am enjoying the hell out of it, here's a video!

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

I tried all this using the mesh warp tool on a jpeg of a watercolor in a frame, which was hanging on a wall.  It worked perfectly up to the point where I switched to “Destination.”    The water color and frame were straightened.  There were areas of the jpeg depicting portions of the wall (outside the newly straightened framed watercolor) that then needed to be cropped out to delete oddly shaped white spaces.   Tried to pull in guides..  Couldn’t.  Selected the crop tool, set the crop. And clicked on Apply.    Nothing.   I tried to maneuver the crop tool a few times, but Apply did not work.   Clicked on Photo HELP, and immediately got the technicolor wheel.   About 3 minutes later, the wheel stopped, but each time I tried  anything (including File>Close) the wheel returned.   Eventually I had to use Force Quit to close Photo.   (MAC Sierra).    Do you have any idea what I missed?   After completing the straighten should I have Saved the JPeg first?       Then opened it again and tried the crop?

It was an experiment. But what a mess!


24" iMAC Apple M1 chip, 8-core CPU, 8-core GPU, 16 GB unified memory, 1 TB SSD storage, Ventura 13.6.  Photo, Publisher, Designer 1.10.5, and 2.3.
MacBook Pro 13" 2020, Apple M1 chip, 16GB unified memory, 256GB  SSD storage
,  Ventura 13.6.   Publisher, Photo, Designer 1.10.5, and 2.1.1.  
 iPad Pro 12.9 2020 (4th Gen. IOS 16.6.1); Apple pencil.  
Wired and bluetooth mice and keyboards.9_9

Link to comment
Share on other sites

I'm not 100% sure of myself in answering, but my first thought is: is your image composed of more than 1 layer? The Mesh Warp is a destructive tool, and only works on a single layer. If, for instance, you use it on a top layer, it may reveal things in underlying layers that you did not intend. Also, and related, was there any masking involved? That could probably screw things up, too. My suggestion would be to do a "Merge Visible" and then apply the Mesh Warp tool to that merged layer.

I doubt that saving the JPG, closing and re-opening will do anything substantive to help this along.

If you want to post the image (post the .afphoto file, not the JPG) I and others can look and make suggestions. No promises, though...

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

1 minute ago, smadell said:

I'm not 100% sure of myself in answering, but my first thought is: is your image composed of more than 1 layer? The Mesh Warp is a destructive tool, and only works on a single layer. If, for instance, you use it on a top layer, it may reveal things in underlying layers that you did not intend. Also, and related, was there any masking involved? That could probably screw things up, too. My suggestion would be to do a "Merge Visible" and then apply the Mesh Warp tool to that merged layer.

I doubt that saving the JPG, closing and re-opening will do anything substantive to help this along.

If you want to post the image (post the .afphoto file, not the JPG) I and others can look and make suggestions. No promises, though...

Thank you so much for responding!!    No, it was a single layer.   I looked at your excellent video and saw that you were working with the background layer.    I haven't a clue how the whole thing happened, but perhaps after I accomplished the mesh warp, I should I have added a new pixel layer before I tried to crop?   Anyway, Photo was extremely obliging.   When I opened it today, it presented me with the original untouched jpeg,  with the invisible message, "please try again."     However, I did use your method with a jpeg of a different  subject, and it worked beautifully.   But just to be sure, I saved the corrected image first as a PNG, then opened it,  and cropped.     1986391715_ScreenShot2019-01-10at1_24_48PM.thumb.png.363efa45fad3d3d2be2c525afcb3d28a.png529650040_ScreenShot2019-01-10at1_20_26PM.thumb.png.26a634db75b6b1a6f6d9ad2a81a5bd23.png 


24" iMAC Apple M1 chip, 8-core CPU, 8-core GPU, 16 GB unified memory, 1 TB SSD storage, Ventura 13.6.  Photo, Publisher, Designer 1.10.5, and 2.3.
MacBook Pro 13" 2020, Apple M1 chip, 16GB unified memory, 256GB  SSD storage
,  Ventura 13.6.   Publisher, Photo, Designer 1.10.5, and 2.1.1.  
 iPad Pro 12.9 2020 (4th Gen. IOS 16.6.1); Apple pencil.  
Wired and bluetooth mice and keyboards.9_9

Link to comment
Share on other sites

@asug8237, the artwork in the photo attached to your post does not appear to be completely rectangular -- the top edge is not straight, which this triangular overlay may make more obvious. 
381935984_topedge.jpg.98f9fc19074b3b5f4a95877684df5571.jpg

Thus, to make it appear perfectly rectangular, you would need to distort it with the mesh tool, but if it was not really rectangular to begin with, it would not represent the actual perspective-corrected artwork.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

  • 4 years later...

Although Affinity Photo is my primary editor, I use Apple Photo to polish away any remaining problems. Affinity may be too difficult for me to straighten museum painting photos; however, Apple Photo does the trick, but is not always near perfect, but it's good enough for me. The tools are found pressing Edit -> Crop and then you will see the slider bars for Straighten, Verticle and Horizontal.

Hope this helps,

David

 

Link to comment
Share on other sites

  • 7 months later...

Sorry to bump this old post, but I cannot use that tool probably. Watched the video from smadell, it looked so easy and cool but when I try to do that, I fail and fail miserably. The photo will get much smaller, distorted to pieces and pure crap. I watched several videos, but everyone just makes mockups...

Can anyone help me or guide to get the result needed? Task is simple, there's a photo of gaskets taken from a weird angle so the perspective really kicks in. I want to flatten that so I can trace out the contour. 

The image:IMG_6565

 

I was trying Perspective tool, with Source mode, but it doesn't have curvature handles. 
image.png.6647a74e6a6850b9bd30cddcfae8fe42.png

If I hit Apply, I get this result. It's cool but useless:
image.png.b3efc366187394d655e17be1f6663f80.png

 

Going for Mesh Warp tool, it had curvature handles, so I can add some curvature from the camera lens.
image.png.0199a022b715b92bb95d95e0a429b84e.png

But as soon as I hit Apply, the tool will create this:
image.png.b96102a2336ebd1f10e06697587ad514.png

 

And doing this for almost 1,5h I'm done. I have no idea what I'm doing wrong and just frustrated so much I'm considering buying the gasket and just scanning it with printer.

Link to comment
Share on other sites

Hi @chose1337 and welcome to the forums,

Assuming all four gaskets are identical and that you want all four gaskets in your finished image I would be inclined to make a copy of the one on the left, rotate it then apply any perspective correction to that one alone and then duplicate the corrected gasket three times...

If you happen to know the correct proportions of the gasket you could create guides or add a rectangle using those proportions to use as a guide so you know once you have matched the proportions for the corrected gasket...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.