Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. to find the width and height of an rectangular object Image

to find the width and height of an rectangular object Image

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dinesh_IP
    wrote on last edited by
    #1

    Hi Friends, I am working on one Image processing application and getting the Image of the object on the monitor using the CCD camera. My task is to find out the actual width and height of an object(object is rectangular in shape). But the practical problem I am facing is how to corelate the actual size of the object with the Image on the monitor. One more critical thing is I need the accuracy in mm. The Image that comes on the screen is not in 1:1 proportion with the actual object. Please help if anybody allready worked on such kind of task. Regards, -Dinesh

    C R G 3 Replies Last reply
    0
    • D dinesh_IP

      Hi Friends, I am working on one Image processing application and getting the Image of the object on the monitor using the CCD camera. My task is to find out the actual width and height of an object(object is rectangular in shape). But the practical problem I am facing is how to corelate the actual size of the object with the Image on the monitor. One more critical thing is I need the accuracy in mm. The Image that comes on the screen is not in 1:1 proportion with the actual object. Please help if anybody allready worked on such kind of task. Regards, -Dinesh

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      That is ludicrous, it can't be done. How can you hope to take a bunch of pixels, work out from that how far an object was from the camera, and then work out the size to mm accuracy ?

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      R 1 Reply Last reply
      0
      • C Christian Graus

        That is ludicrous, it can't be done. How can you hope to take a bunch of pixels, work out from that how far an object was from the camera, and then work out the size to mm accuracy ?

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        R Offline
        R Offline
        Rage
        wrote on last edited by
        #3

        Christian Graus wrote:

        size to mm accuracy

        He did not tell how accurate the camera is.

        ~RaGE();

        I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus

        C 1 Reply Last reply
        0
        • D dinesh_IP

          Hi Friends, I am working on one Image processing application and getting the Image of the object on the monitor using the CCD camera. My task is to find out the actual width and height of an object(object is rectangular in shape). But the practical problem I am facing is how to corelate the actual size of the object with the Image on the monitor. One more critical thing is I need the accuracy in mm. The Image that comes on the screen is not in 1:1 proportion with the actual object. Please help if anybody allready worked on such kind of task. Regards, -Dinesh

          R Offline
          R Offline
          Rage
          wrote on last edited by
          #4

          What you need is a graduated measuring rod, e.g. something that you know the size of and that will be recorded at the same time by the camera. Another solution is to have the distance between your rectangle and the camera be always the same, and have a calibration run to set up the ratio before you start monitoring.

          ~RaGE();

          I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus

          D 1 Reply Last reply
          0
          • D dinesh_IP

            Hi Friends, I am working on one Image processing application and getting the Image of the object on the monitor using the CCD camera. My task is to find out the actual width and height of an object(object is rectangular in shape). But the practical problem I am facing is how to corelate the actual size of the object with the Image on the monitor. One more critical thing is I need the accuracy in mm. The Image that comes on the screen is not in 1:1 proportion with the actual object. Please help if anybody allready worked on such kind of task. Regards, -Dinesh

            G Offline
            G Offline
            G_S
            wrote on last edited by
            #5

            when you have finished this project the Nobel Prize is garanteed to be awarded to you. good luck :)

            G_S

            R 1 Reply Last reply
            0
            • R Rage

              What you need is a graduated measuring rod, e.g. something that you know the size of and that will be recorded at the same time by the camera. Another solution is to have the distance between your rectangle and the camera be always the same, and have a calibration run to set up the ratio before you start monitoring.

              ~RaGE();

              I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus

              D Offline
              D Offline
              dinesh_IP
              wrote on last edited by
              #6

              Hi Rage, I guess this will be a good solution, thanks.

              1 Reply Last reply
              0
              • G G_S

                when you have finished this project the Nobel Prize is garanteed to be awarded to you. good luck :)

                G_S

                R Offline
                R Offline
                Rage
                wrote on last edited by
                #7

                G_S wrote:

                Nobel Prize

                I actually wrote a software doing this with a colleague during my study. Where's the Prize ? :)

                ~RaGE();

                I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus

                G 1 Reply Last reply
                0
                • R Rage

                  G_S wrote:

                  Nobel Prize

                  I actually wrote a software doing this with a colleague during my study. Where's the Prize ? :)

                  ~RaGE();

                  I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus

                  G Offline
                  G Offline
                  G_S
                  wrote on last edited by
                  #8

                  Well it is doable but not only with 1 cam and no other equipment or reference points from 3d. But this is actually interesting to try to solve

                  G_S

                  1 Reply Last reply
                  0
                  • R Rage

                    Christian Graus wrote:

                    size to mm accuracy

                    He did not tell how accurate the camera is.

                    ~RaGE();

                    I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #9

                    Well, regardless, if the rectangle is something moving through the scene, how does he know how close to the camera it was ?

                    Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups