Ask Your Question

Decapitary's profile - activity

2020-10-07 12:52:08 -0600 received badge  Student (source)
2020-08-04 05:27:53 -0600 received badge  Famous Question (source)
2019-01-12 05:29:16 -0600 received badge  Notable Question (source)
2018-03-10 22:24:21 -0600 received badge  Popular Question (source)
2016-04-06 13:14:10 -0600 asked a question Calculate the Object Distance from camera

Ive read in this question that the object distance from the camera is

distance to object (mm) = focal length (mm) * real height of the object (mm) * image height (pixels)
                          ---------------------------------------------------------------------
                          object height (pixels) * sensor height (mm)

I have a HTC M9s and a red ping pong ball.In this variables I only know the real height of the object (mm) and image height (pixels) and object height (pixels)

but I dont know focal length (mm) or sensor height (mm).how can I find them? How much is this reliable?

2016-02-13 11:23:28 -0600 commented question Track 3 SPECIFIC bubble in videostream full of bubbles

@berak cool. thank you so much

2016-02-13 10:59:19 -0600 commented question Track 3 SPECIFIC bubble in videostream full of bubbles

@berak and then I would have the same problem: how can I add coords of every bubble in specific lists.look at this lk_track . I want to make a list just like self.tracks for polylines

2016-02-13 10:44:46 -0600 commented question Track 3 SPECIFIC bubble in videostream full of bubbles

@berak my output frame is from canny and minEnclosingCircle is more accurate than moments to get center coords and radius.my problem is how to append the coords to related list

2016-02-13 10:17:59 -0600 commented question Track 3 SPECIFIC bubble in videostream full of bubbles

@berak I cant use that function cuz my frame is binary. and I need center coords.I just dont know how lk_track create a list of lists for cv::polylines

2016-02-13 09:14:00 -0600 received badge  Editor (source)
2016-02-13 02:50:11 -0600 asked a question Track 3 SPECIFIC bubble in videostream full of bubbles

I want to track 3 bubbles in videos(converted to GIF for uploading) like this

and append the x,y in vectors or lists for cv::polylines. I can track if there is ONLY bubble in every frame and draw a track line for it with polylines but when I want to append ALL OF THEM in lists so I can select the bubbles I want, stuff goes WRONG.

I cant append the x and y of a bubble in its own vector.

code is simple but I made A CODE for anyone who needed the obvious code:

   Mat frame,edgeFrame;
    vector<vector<Point>> cnts;
    vector<Vec3i> hie;
    vector<Point2f> XY;
    float r;
    // specific vector for each bubble
    vector<Point> firstBubble,secondBubble,thirdBubble,fourthBubble,millionthBubble;
while(true){
        cap >> frame;
        canny(frame, edgeFrame, 50, 150, 3);
        findContours(edgeFrame, cnts, hie, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE);

        for(int i = 0 ; i < cnts.size() ; i ++){
         minEnclosingCircle(cnts[i], XY, r);

         circle(frame, XY , r , Scalar(0,0,0), 1 , LINE_AA);

         // append the XY of contour to the specific list
         //AKA the problem

}
}

to be more clear I want to draw from vectors like track lines: the GOal

P.S : one,two,three,four, ... is the name of vector.

this is not the only video that I want to track my bubbles.

bubbles are eggZaklty the same color and shape but the radius is not constant and it can be chaotic

THE BUBBLES CAN MOVE HORIZONTALLY TOO

EDIT: Can I use something "like" optical flow on binary images? what I want is in lk_track in python examples