Skip to main content
. 2018 Mar 25;18(4):972. doi: 10.3390/s18040972
Algorithm 1 Data acquisition by modifying the image nature. (Figure 6 top).
Input: Capture image
Output: Extract CoG(X,Y),β values
Require: camera ON
  • 1:

    Capture (Img)

  • 2:

    Binarize (Img) //Threshold of the object to be detected

  • 3:

    if (Object_detected (Img) == true) then

  • 4:

     //Image Pre-Processing

  • 5:

     Set_lines = Hough_lines(Img)

  • 6:

    θ = Pers_Angle_Estimation(Set_lines) //Calculation of perspective angle

  • 7:

     Img_rect = Rot_pers(img,θ) //Image rotation

  • 8:

  • 9:

     //Parameter computation

  • 10:

     Bottle = Get_Blobs(Img_rect)

  • 11:

    (XCoG,YCoG) = Get_CoG(Bottle)

  • 12:

    β = θ

  • 13:

     end if

  • 14:

     return (XCoG,YCoG),β