PSP X8: Find centre of a selection or image

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
Helvetica
Posts: 13
Joined: Thu Nov 09, 2017 1:00 am
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
Corel programs: Paint Shop Pro X6; Paint Shop Pro X8
Location: Canton Paradise, Switzerland

PSP X8: Find centre of a selection or image

Post by Helvetica »

I didn't know whether this is the correct section, or whether I should ask under "Imaging".

I work a lot with images of ancient coins which, unlike coins today, were all struck by hand and are seldom perfectly circular. I very often have to remove the backgrounds of coins (backgrounds can be - depending on how the coin photo was taken by the owner - black, red, blue etc, held on a hand, checkered, lines on a wooden table, etc etc.)

So what would be ideal would be a function where I could mark the left hand edge of the coin, then the right hand edge, the top edge and the bottom edge and PSP would find me the centre, so I can then draw a circle or ellipse from that centre and get just the coin without any background traces.

Is there any function in X8 which I haven't found yet, which can find me the exact centre of an image or a selection ?
Kathy_9
Site Admin
Posts: 2896
Joined: Tue Nov 30, 2010 12:44 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: 8th Generation Intel Core i7 8700 3 20 GHz
ram: 16GB
Video Card: NVIDIA GeForce RTX 2060 [6 GB GDDR6 dedicated]
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2TB
Monitor/Display Make & Model: HP EliteDisplay E243m 23.8-inch
Corel programs: PSPX2 ~2023; Painter 2018~23
Location: USA
Contact:

Re: PSP X8: Find centre of a selection or image

Post by Kathy_9 »

Wouldn't it be easier to promote the background layer to a raster layer that supports transparency and use one of the selection tools to select the coin; invert the selection and hit delete?
PSPX9 | PSP2020 | PSP2021| PSP2022 | PSP2023 & PhotoMirage installed; PSPX | PSPX2 thru PSP2019 owned but not installed
http://www.flickr.com/photos/37153430@N03/
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: PSP X8: Find centre of a selection or image

Post by LeviFiction »

I can think of several different methods but to make things easier I'll only mention three of them.

1) Draw out a rectangle to mark the edges of the coin. Create a quick and dirty ellipse, select both the rectangle and ellipse (rectangle first) and allign their centers. Now the ellipse is in the center of the coin. Resize to fit (holding CTRL to maintain the center)

2) Draw out a rectangle to mark the edges of the coin, then simply round off the edges of the rectangle using the horizontal and vertical radius options and if the image is small enough the result will be a perfect ellipse with the center in the center of the coin.

3) Finally, I made a very quick script that will create a vector ellipse that matches the layer you're working on. So what you do is you create a blank layer and then add 4 quick dots to represent the edges of the coin. Run the script and it'll create an ellipse that should match the coin pretty well.

And of course, there are many other options.

I made a video demonstrating all three methods, I mess up several times with the words I'm using so ignore my voice.

Video: https://drive.google.com/file/d/1AdAlOx ... 34UTc/view

Script:
Attachments
LayerSizeEllipse.zip
(852 Bytes) Downloaded 116 times
https://levifiction.wordpress.com/
Helvetica
Posts: 13
Joined: Thu Nov 09, 2017 1:00 am
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
Corel programs: Paint Shop Pro X6; Paint Shop Pro X8
Location: Canton Paradise, Switzerland

Re: PSP X8: Find centre of a selection or image

Post by Helvetica »

Thankyou so very much for this wonderful post and the even more wonderful video - I am such a newbie at these newfangled PSP versions (I still prefer the 1999 PSP 6 for small jobs) I had to keep stopping the video every couple of seconds to make notes, as I have never worked with vectors, scripts or objects before and needed to write down what you were doing.
In fact I even had to google "how to add a script to PSP X8" !
I downloaded your script and tested it and it seems to me to be the simplest solution, although I will definitely try the others. I need to check the video again to make sure I haven't left out any of your steps, because of course YOU know what you are doing, whereas I don't have a clue :-)
Thankyou so much again.
Helvetica
Posts: 13
Joined: Thu Nov 09, 2017 1:00 am
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
Corel programs: Paint Shop Pro X6; Paint Shop Pro X8
Location: Canton Paradise, Switzerland

Re: PSP X8: Find centre of a selection or image

Post by Helvetica »

Kathy_9 wrote:Wouldn't it be easier to promote the background layer to a raster layer that supports transparency and use one of the selection tools to select the coin; invert the selection and hit delete?
Kathy, my dear fellow feline mummy (by the look of some of the pics in your wonderful gallery), I think if you had given me instructions in Greek or Latin on how to repairing a galley sail, I would have understood you better. :D
I honestly have no idea how to even start doing that. The images I work with (from museum collections, private collections, catalogs, auction houses, databases etc) are never layered, so somehow I would need to make a background layer which, depending on the background (patterned or plain or someone's hand or grubby fingers from digging up the coin etc), might be tricky. Then puzzle out the rest of your instructions :D
Post Reply