Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    graphic Floor Plan to Digital Coordinates

    How to convert a scanned floor plan to numeric coordinates?

    Years ago I had a laser printer with commands such as BOX and LINE. A simple program translated coordinates of a floor plan (width, length, width, length) and positions and size of windows and doors (In, Up, width, height) to the appropriate BOX & LINE commands. In this way i produced a series of wall segments which could be glued at each end to make a room. With doors and windows. hence a 3-D "dolls house" model of a building such as a residential house.

    I am now armed with floor plans of a large building, 6 storeys, and am considering trying to "map" the graphic image to coordinate points, and generating my building kits from the coordinates. I don't have the old laser printer anymore, but figure that a VBA solution to generate BOXes and LINEs with drawing objects ought not be difficult.

    The goal is a set of sheets such as those that some of us used to build churches, shops and stations for our model railways.

    I don't want to sit nights with a plastic ruler, measuring and keying in cm.mm measurements.

    I'd be interested in a solution that might take a scanned image and work out the coordinate points.
    I can assume all doors at a specific height (e.g. 2 metres) and all windows at a specific height.
    Attached Images Attached Images

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

    Re: graphic Floor Plan to Digital Coordinates

    I've tried something vaguely similar myself. Rule #1 was to make sure your scans were not skewed. <img src=/S/grin.gif border=0 alt=grin width=15 height=15> I'd use a drawing (not paint) program and paste the scanned image in as a bitmap. Over the top of this, I'd draw lines, boxes, points etc. Many such packages have libraries of architectural symbols - doors, windows etc. These are genuinely scalable graphics e.g. .WMF, not just bitmap pictures. Once I'd covered the picture with the appropriate shapes, I could delete it and be left with a picture consisting of scalable graphic objects. You could even include a "scalable scale" object, which would scale itself up or down with the printout size. Graduated axes or grid are also possibilities.

    Lots of <img src=/S/free.gif border=0 alt=free width=30 height=15>ware packages around to do this kind of thing. I'll have a dig around if you're interested.

    Alan

  3. #3
    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: graphic Floor Plan to Digital Coordinates

    Many moons ago, and I believe it was Alan that asked this question.....that the Lounger had a series of images of countries and wanted to find the area of each one and find the largest one by area. The images were yellow borders on black. I suggested that you could use VB6 and scan pixel by pixel until the colour code was yellow and then count the number of black pixels in between each row and "count" the arbitary value of the black pixels and compare.

    Using a similar method you could scan down the x and y axis and get coordinates when the pixel changes colour from white to black but looking at the quality of the images (no offence please) this could be a problem as the edges are quite pixellated and may skew your results
    Jerry

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

    Re: graphic Floor Plan to Digital Coordinates

    You've got the memory of an elephant, Jezza... which is rather odd for a bear <img src=/S/confused.gif border=0 alt=confused width=15 height=20> But I didn't end up using that method in the end, since I found consistently scaled outline maps of all the countries of interest. As you mention, the problem I see with scanned images is the ragged pixel edges. It might be on a sufficiently fine scale so as not to be a problem though. Maybe some postscan processing (sharpening, edge detection etc.) might help too.

    Alan

  5. #5
    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: graphic Floor Plan to Digital Coordinates

    Scary isn't it <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    That post stood out in my mind as I used the concept for one of my inventions, the Adverscope which I tried to automate using VB6 but never got around to finalising the electronic aspect of it as I had to build an object library and I started to build other things.

    Your latter point is probably the way forward but I think Chris has got a rather large challenge ahead of him, but it will be nice to see how he approaches it
    Jerry

  6. #6
    4 Star Lounger
    Join Date
    Feb 2006
    Location
    Cape Cod, Massachusetts, USA
    Posts
    408
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: graphic Floor Plan to Digital Coordinates

    You might see if JR Screen Ruler will do the job for you.
    http://www.spadixbd.com/freetools/index.htm

    Paul

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: graphic Floor Plan to Digital Coordinates

    >Rule #1 was to make sure your scans were not skewed.
    All right; ALL RIGHT! (grin)

    > I could delete it and be left with a picture consisting of scalable graphic objects
    Ah, but I don't want s set of graphic objects of the plan; I want to learn the plan's objects coordinates and then produce an elevation from those coordinates.

    It is true that I could capture the coordinates while doing the drawing, since each object (wall line, door line, window line) defines the length/width I want. I would use a default hight for each object.

    I was thinking over this and began to wonder whether I can't just use my mouse as a data-point capture device:
    Use a photostat copy of the plan as a mouse pad; slide the mouse to a point, click and record (VBA) that click (pixel?) position, move on to the next point.
    My syntax looks like this:<pre>A building is a series of floors.
    A floor is a series of rooms
    A room is a series of walls followed by a tab
    A wall is a space followed by none or more WinDoors
    A space is a length with an optional height
    A windoor is a length with an optional height, a length with an optional height.
    A tab is 0.80 of a space height.
    </pre>

    I want to build up a description of a 12'x15' room with a 2'x6' door and a 3'x3' window like this:
    12,,15,,12,,15,,1,0,2,6,7,3,3,3

  8. #8
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: graphic Floor Plan to Digital Coordinates

    > (no offence please)
    None taken, but let me brood on this over the weekend (grin) It's not anything to do with clicking all over the place, is it?

    > get coordinates when the pixel changes colour from white to black
    I think this is the crux of my original query: Is there a smart scanning package out there, the equivalent of OCR for text, that can read a scanned drawing and deliver a series of data points?
    If there were, I'd scan in my flloor plan, use MSPaint to eliminate extraneous objects and then ask for the digital coordinates.

    It was thinking of that that reminded me of how I trim my MSPaint JPGs: I choose the paintbrush tool, move the mouse to my proposed limit of drawing, read(by eye) the coordinates from the lower-right status bar, then (keyboard) choose Image, Attributes. I thought "since I can SEE those two coordinates, why not move the mouse, click, and have VBA record the coordinates?

  9. #9
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: graphic Floor Plan to Digital Coordinates

    >JR Screen Ruler
    Thanks for the link.
    I installed this and played with it. It is a good way to transfer coordinates from the screen image into my brain, but then i need to get them from my brain into a digital form. It seems like a parallel method to my idea of eyeballing the image in MSPaint.

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

    Re: graphic Floor Plan to Digital Coordinates

    Well, Precision Image Digitizer by Mike Robinson isn't free, but seems like pretty god value for ten bucks. Sounds similar to what you're thinking of developing in VB.

    Alan

  11. #11
    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: graphic Floor Plan to Digital Coordinates

    There are programs to capture coordinates when you click. They are used to create client-side image maps for web pages. Check out: Mapedit.

  12. #12
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: graphic Floor Plan to Digital Coordinates

    >Sounds similar to what you're thinking of developing in VB.
    I agree, and thanks for the tip
    "Even though an image is not displayed on the screen, you can still click, record, and then save the point files. "

    This accommodates my idea of using the photocopied images as a mouse pad and recording the clicks (saves scanning but is less accurate).

  13. #13
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: graphic Floor Plan to Digital Coordinates

    Thanks Jefferson
    >They are used to create client-side image maps for web pages.
    This looks like a bit of overkill for my needs, which are essentially simple rectilinera(?) point recording.
    I think MapEdit is geared towards a more complex shape, such as river boundaries?

  14. #14
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Doorn, Netherlands
    Posts
    311
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: graphic Floor Plan to Digital Coordinates

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    Chris,

    As I understand, the problem you describe is fairly general: how to co-ordinate or digitize pixels. If you know something about GIS you could scan it as a tif file and ad so-called World coordinates to it. The file then becomes a socalled GeoTiff file, which are actually two files: the tiff file itself and a coordinate file.

    A different approach is using the Grabit! addin with Excel, used to digitize curves from a scanned image, such as emf, png, jpg etc. Although in your case you do not have a curve as such, you are interested in coordinates of points, (corners, crossings) etc. Grabit! is not freeware, but there are freeware addins that do more or less the same.

    More info http://www.ccp14.ac.uk/solution/hardcopy2data.htm.

    Regards, Teun

  15. #15
    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: graphic Floor Plan to Digital Coordinates

    HTML image maps let you choose between rectangles, circles and polygons. If your lines are not perfect horizontal and vertical, then yes, you will be capturing polygon coordinates. But while the output will require some interpretation, it certainly is not a sophisticated process. Click, click, click, click.

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
  •