stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

6h 25m 46s logged

Oct 21 Devlog 2

detecting the circle in the gauge

  • i have fixed the fps issue previously and getting stable fps to perform my task through a webcam its mentioned in first devlog so i moved on to next part

  • so after that i started working on detecting gauge and its main pin

  • first i started with detecting the circle and middle point of the gauge so i used gauge image for that for now and then i apply same algorithm in video input

  • so i understanded the geometry of circle to detect circle in the gauge

  • then i get to know that we have prepare the image first for the detection in which we apply grayscale filter and blur to image , blur to reduce the noise

  • after that preparing i used the “cv2.HoughCircles()” library of open cv this library search the circular shapes in images it have multiple parameter we can tweak to get desirable outcome

  • after using that library to detect circle i draw the circle in the image and displayed the output in terminal

  • after detecting the main circle in gauge finding the pin mid point is easy just put an dot on middle of circle(repented by red)

Long Part Detecting the needle

  • to detect the main gauge needle we have to mask the dial gray scale the region and using edge detection to highlight the boundaries and line (photos added)
  • then identify the candidate line around the gauge so they all not mix-up (only detects straight lines )
  • then i visualized the lines
  • i faced like problem in unpacking this detected line coordinates because it is structed as a single integer
  • so i lookup for solution and come accross it we have to use “fatten()” it coverts arrays into one-dimensional array i didnt get it that much but its like assigning multiple coordinate at single point
  • and i got lines on the images but all are not filtered too many line the out put is usable
  • so we have to use filters like in the sence a set rules which line can pass through which are not
  • i mused midpoint formula to calculate the closest line to the mid point to detect the needle
  • after that i used angle calculation too
  • after that i used all of this filtration and all that and combine it together and got the output
  • in last now its detecting the needle and dial of the gauge given in input

(some time is inflated due to some error in hackatime i hope it solve asap it tracked my unrelated grokbot session time in this project )

0
12

Comments 0

No comments yet. Be the first!