robaho / seashore

easy to use mac osx image editing application for the rest of us
GNU General Public License v2.0
454 stars 20 forks source link

Keystone Correction Tool #176

Closed dadr closed 1 year ago

dadr commented 1 year ago

Enhancement Suggestion: I could really use a keystone correction tool. Most of the parts seem to already be developed. The polygon lasso tool is good to select the keystone, and the perspective transform tool does almost the right thing. The problem with the existing perspective transform is that you have to guess at the points to correct the keystone, and then typically stretch back the result. Is it the case that a proper transform for the perspective tool is a two-axis flip of the points of a keystone picture? It just feels really close to having the function I need. The reason I need it is that my wife makes copies of her siblings photos, but doesn't bother to try to align the phone to square up the picture. Like the following...

IMG_4323

Thanks and Best Regards!

robaho commented 1 year ago

I have a solution for this in 3.12. Can you attach a raw image and a corrected one to ensure it works as expected. You should be able to PM them to be if need be.

dadr commented 1 year ago

Hi @robaho, That's great news! I've attached a before and after here. Let me know if I can help in any other way.
IMG_5145 IMG_5145 jpg

robaho commented 1 year ago

If you update to the latest 3.12, you have the keystone correction filters under Geometry.

dadr commented 1 year ago

I tried the App Store, but it did not show an update was available. I’m on 3.11. Is there another source for the update? I might not have understood your previous comment. I thought you wanted to see what I wanted to accomplish. Thanks again

robaho commented 1 year ago

You may have to search/refresh. My testing shows it is available now. Maybe based on location it may not be available yet.

dadr commented 1 year ago

The update showed up on my computer this morning. I'm still having troubles with it. I see the new options. The keystone options allow me to select the 4 points around the picture, but then they don't do anything. The perspective correction tool also allows me to select 4 points, but then I get a short delay with the whirling beach ball and the adjusted picture appears. Another effect I notice is that after I try to apply the keystone, other tools, like crop (sometimes) no longer work. For example, after trying a keystone operation I can go to the crop tool, select a crop box, but both crop buttons are disabled. (I don't know if it helps, but I have a MacPro (Mid2010) with 6 cores, 32G RAM and Radeon RX 590 graphics. It runs Mojave 10.14.6)

robaho commented 1 year ago

You should be able to drag the points (the X's) after the selection. You need to 'Apply' the effect before switching to another tool - otherwise it automatically 'resets'.

Is it possible to attach a video of what you are trying?

dadr commented 1 year ago

NP see attached. Let me know if you'd like to see a different "workflow." I had to reduce quality to get it to upload here. If it's too blurry I can upload to google drive and share a link.

https://user-images.githubusercontent.com/6684314/207102557-8ae4457c-ab96-49fe-b2ac-d67e04bf3433.mov

robaho commented 1 year ago

I think you simply need to drag the 'X' after placing the 4 of them to adjust the skew. It doesn't do it automatically. (I am looking at a way to do that).

robaho commented 1 year ago

The keystone and perspective correction plugins required OSX 10.15+ - that is why they are not working. I am looking at reporting this more clearly in a future release. Sorry.

dadr commented 1 year ago

Oh! That's sad. But let me thank you for all the time and effort you put into my problem Many Thanks!

robaho commented 1 year ago

After further review, the perspective correction should be available since 10.10. Have you tried this in the latest release? I think this does what you want and it very easy to use. I tested it in the sample image you provided.

dadr commented 1 year ago

I just tried it in 3.16. The behavior has changed, now I see the three options for keystone, but when I try to use one, I get the attached message and then the option is greyed-out afterwards. (I'm on OSX 10.14.6) Screen Shot 2022-12-23 at 11 26 25 AM

robaho commented 1 year ago

The keystone filters are not available in your version of OSX, BUT the "perspective correction" should be - and that is what you should use anyway. It is easier and works well - I tried it on the sample image you submitted.

dadr commented 1 year ago

Yes, I can confirm that perspective correction works on my computer. I will give it a try. It works on the example of photos where the “box” is at the outside edge of the image. It doesn’t work so well when the rectangle is an interior feature of the image. ( Or I might just need to learn something clever about the crop slider on that tool !)

robaho commented 1 year ago

Try using the “detect rectangle” and see where it placed the points. Then you can manually adjust the points.