Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Obscure request

  1. #1
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Obscure request

    I'm after something that can give me the area (in pixels even) enclosed by a selected shape or vector object "outline". I'm wanting to compare relative areas on maps that are composed of such shapes. Any ideas?

    Alan

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    Doesn't Irfanview sort of let you do it? If you select & press Ctrl+Y (to crop), you can then press Ctrl+R to see the image size in pixels. If you then press Ctrl+Z, it goes back to the original (but you can't test 2 changes & then go back).

  3. #3
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    I guess I didn't explain it very well. I want to find the area enclosed by the outine of the map, as in the area of yellow pixels in the example below.

    Alan
    Attached Images Attached Images

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    Oooh. As Ruth Buzzy would say, "That's very different." <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Obscure request

    I had the thought that you could find software to count all the black pixels, which would allow you to calculate the two areas, but that wouldn't be a general solution unless you always have these "two color" maps.

  6. #6
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Confoederatio Helvetica
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    Looks like Luxembourg to me, or is that Andora?

  7. #7
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    I may have to knock up something like that myself. It should be easy enough to traverse, pixel at a time, and subtract the black count from the height x width. These are actually scalable vector images, that need to be overlaid in such a way as to make relative areas consistent with relative physical areas.

    Alan

  8. #8
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    No cigar Bowlie! It's (meant to be) Afghanistan.

    Alan

  9. #9
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    You can have a numeric go at it... With Photo Editor, hovering the mouse cursor about the image you can obtain as many arguments and function values as you want from the status bar. Then replace in your favorite numeric integration formula and you're done <img src=/S/grin.gif border=0 alt=grin width=15 height=15>. Problem is, i) how many arguments you want to take ii) the result is obviously not exact (actually there's a non-zero probability that the result is exact, but let's just consider it's zero) iii) it's a pain in the rear.

    Just kidding.
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

  10. #10
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Obscure request

    Alan

    I am becoming a bit scared that you are showing similar problems and interests!

    I was toying with this idea a few months ago when I was looking to find areas of specific shapes such as maps.

    One of my ideas was to count the pixels (using PSet) on each row of the graphic where there was a certain colour, where the program found a change in colour in the row it would then "measure" its length in Pixels. I thought this was a good idea until I realised that there could be an outcrop of land which would also have to be counted. This would then continue through each line of pixels until it got to the bottom. It could then multiply the number of rows by the eventual length.

    I realised this would only work if I had only two colours, like your map, but even at the borders of each color there would be aliasing where the colour varies slightly.

    This program is still sitting on my home PC requiring action, but I have got distracted by POV-Ray and Blender.
    Jerry

  11. #11
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Obscure request

    Hi Alan

    I had a go at it with a few tools but no go.

    We (ie, my wife) tried Photoshop. Best she could do was get an arbitrary shape with a bounding box around it (a rectangle around the shape). PS would give you the count of pixels (HxW) of the bounding box. Probably could do the same thing in Photoshop Elements (cheaper).

    But we (really, both of us at the same time and independently) did have an idea that you might want to check - bring the same, somehow, into a CAD program. Those things are used to dealing with odd shapes and can give areas of a specified shape. At least to the crude knowledge of CAD programs that we have. And I bet you'd know where to get one of those programs. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Fred

  12. #12
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    I just tried your method Diegol, but it turned out to be faster to manually count the screen dots with the tip of a pen. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Alan

  13. #13
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    <hr>I am becoming a bit scared that you are showing similar problems and interests!<hr>Did I mention that I've also been playing around with EvesdroppingJezza'sStudy 1.0 beta? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    I don't think it would be too hard to program the pixel count-by-colour aspect. I've already done similar things in VB and C/C++ for plotting curves. As you say, it's colour graduation, even in a (nominal) 2-colour map, that's a bit of a hitch. But with Irfanview, it's easy to convert the outline-only maps I have to b/w. Colour depth can then be increased from 2 to 16 if desired, to floodfill bounded regions, thereby offering distinction. Also, I don't mind the inaccuracy of an approximate border that may result from such processing.

    Alan

  14. #14
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    Thanks Fred. The idea is an interesting one, but I doubt that the graphics I have would be very conducive to import into a CAD program. I do know of numerous <img src=/S/free.gif border=0 alt=free width=30 height=15> CAD offerings, but I too am only a basic user, so have no specific knowledge of their area measurement capabilities.

    If you're interested, there's a good source of CAD programs here, many being freebies.

    Alan

  15. #15
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Tokyo, Japan
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obscure request

    I came across this one just recently and I remembered this was a thread from last year. You might still be interested Universal Desktop Ruler . Not a freeware though but there's a trial version.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •