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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. To find radius of a circle

To find radius of a circle

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
4 Posts 3 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 where I am capturing the Image of the circular object and by edge detection I am getting the periphery of that circular object. Now I want to find out the radius of the same circular object, can any body guide me how to find the radius of the circle. Regards, Dinesh.

    T R 2 Replies Last reply
    0
    • D dinesh_IP

      Hi Friends, I am working on one Image processing application where I am capturing the Image of the circular object and by edge detection I am getting the periphery of that circular object. Now I want to find out the radius of the same circular object, can any body guide me how to find the radius of the circle. Regards, Dinesh.

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      this is more a math question. if you know the periphery length (let's call it P), then you can do this :

      P = 2 * pi * r
      r = P / ( 2 * pi)

      with r beeing your radius


      TOXCCT >>> GEII power

      [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

      D 1 Reply Last reply
      0
      • D dinesh_IP

        Hi Friends, I am working on one Image processing application where I am capturing the Image of the circular object and by edge detection I am getting the periphery of that circular object. Now I want to find out the radius of the same circular object, can any body guide me how to find the radius of the circle. Regards, Dinesh.

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

        dinesh_IP wrote:

        I am getting the periphery

        Unlike tox, with that I understand that you have access to the points representing the circle on the screen. If you really have the periphery length, then have a look at his post. If you have "captured" a set of points defining the circle, simply look for min and max coordinates in each direction (let's call them xmin,xmax,ymin and ymax), then : radius = (xmax - xmin)/2 or = (ymax - ymin)/2 (both values should be the same). center point of the circle is (xmin + radius, ymin +radius), for instance.

        ~RaGE();

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

        1 Reply Last reply
        0
        • T toxcct

          this is more a math question. if you know the periphery length (let's call it P), then you can do this :

          P = 2 * pi * r
          r = P / ( 2 * pi)

          with r beeing your radius


          TOXCCT >>> GEII power

          [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

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

          thanks tox.

          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