Ask Your Question

Samos's profile - activity

2014-03-02 14:30:14 -0600 received badge  Scholar (source)
2014-03-02 06:53:02 -0600 commented answer Android. How to check if contours touch position on screen.

I have tried your algoritm (before your answer), but even I got contours on the right part of the screen, some points have x =1 and y=1. Becouse of that this algoritm don't work very good, epecially, if I want to compare points with two or more separated lines.

2014-03-02 05:28:23 -0600 commented answer Android. How to check if contours touch position on screen.

Thanks for quickly response. I wanted to explain my problem in a simple way, but now i see that I used bad example. So I will try one more time.

  • I have screen size 1000x500 pixels.
  • In a middle of the screen I have painted vertical line. upper point is x=500 y=0, bottom point x=500, y=500
  • in function public Mat onCameraFrame(CvCameraViewFrame inputFrame) {...} using BackgroundSubtractor I got List<MatOfPoint> contoursPoints using Imgproc.findContours(...).

Question: how can I check if points from contoursPoints list "touch" the line that I had created?

Eitd: I'm trying conwert MatOfPoint to Point and then check x position, but always some of that points got x=1, y=1 :(

2014-03-01 18:23:05 -0600 received badge  Student (source)
2014-03-01 17:40:34 -0600 asked a question Android. How to check if contours touch position on screen.

Hi. I'm trying to get information, when contours touch some "object" on screen. For exasmple:

On screen I paint rect. Now I want to touch it, and get information "finger is touching rect". Is it possible?

Regards