Ask Your Question

kbarni's profile - activity

2020-10-08 15:29:41 -0500 received badge  Nice Answer (source)
2020-09-15 04:08:24 -0500 commented question Opencv multiple bubble detection in a image

HoughCircles...?

2020-09-10 03:23:12 -0500 answered a question Opencv multiple circle detection in a image

Try the DistanceTransform, it's another good method for circle detection in binary images. This example should help.

2020-09-02 13:53:46 -0500 answered a question Way to distinguish two different textures without dataset

Well, this seems as a classical texture analysis problem. There are some robust texture descriptors which can be used t

2020-09-02 04:20:22 -0500 commented question Locate specific pixel from left and right view on the disparity map

For a pixel from the left camera PL(X,Y) the corresponding pixel in the disparity map has the same coordinates PD(X,Y).

2020-08-28 11:15:44 -0500 answered a question I install OpenCv in a raspberry pi 3 with c++

Windows doesn't run on the Rasp. But Linux (Raspbian) is simple...just get used to the fact that it's different than Win

2020-08-27 05:48:30 -0500 answered a question How can I detect curved line?

Curve detection is not simple in image processing. AFAIK there is no standard way for doing it (like the Hough transform

2020-07-29 06:19:27 -0500 answered a question Finding corner points for perspective transform without clear landmarks.

I think Yolo is a bit overkill for ball detection, but you can keep if it works. You might also try HoughCircles. The i

2020-07-29 06:00:38 -0500 commented question Finding corner points for perspective transform without clear landmarks.

I think Yolo is a bit overkill for ball detection. You might try HoughCircles, or the inRange function and then Connecte

2020-07-27 10:27:24 -0500 answered a question Join floating white pixels to the nearest island without closing morph?

Run the ConnectedComponentsWithStats function on the image. Get the smallest surfaces, as zones to merge. Then, for ea

2020-07-27 10:08:49 -0500 commented question Block until window closed

I'm using Ubuntu and OpenCV 4.3. I have to check on windows...

2020-07-27 10:06:43 -0500 commented answer Apply getPerspectiveTransform and warpPerspective for bird-eye view (Python).

Yes, the best solution would be to use 4 visible and fixed red balls or points. I also like to use ARUCO markers for cal

2020-07-27 10:04:43 -0500 edited answer Block until window closed

A minute of googling could have made you find out that you can use getWindowProperty() to check whether the window is ok

2020-07-27 09:59:26 -0500 commented answer Apply getPerspectiveTransform and warpPerspective for bird-eye view (Python).

Yes, the best solution would be to use 4 visible and fixed red balls or points. I also like to use ARUCO markers (in oth

2020-07-27 09:27:11 -0500 commented answer Apply getPerspectiveTransform and warpPerspective for bird-eye view (Python).

You'll need some markers for calibration. Either add some colored points to the field that you can use for calibration o

2020-07-27 08:14:33 -0500 answered a question Apply getPerspectiveTransform and warpPerspective for bird-eye view (Python).

WarpPerpective will transform a rectangle seen in perspective (like a trapeziod) into a real rectangle. For it to wor

2020-07-25 07:58:00 -0500 marked best answer Block until window closed

I would like to display a window, and block the program execution until the user decides to continue. This is done normally the following way:

Mat img1,img2;
//...process...
namedWindow("Image1",WINDOW_NORMAL);
imshow("Image1",img1);
waitKey();
destroyAllWindows();
namedWindow("Image2",WINDOW_NORMAL);
imshow("Image2",img2);

The only problem with this approach is if the user instinctively closes the window using the X button. Then, as no HighGUI windows are active, waitKey() will never return and the program blocks.

Is there any solution, so the program waits a keypress OR the window to be closed?

2020-07-24 10:15:40 -0500 asked a question Block until window closed

Block until window closed I would like to display a window, and block the program execution until the user decides to co

2020-07-24 09:46:05 -0500 edited answer Will pay for libopencv_java.so v2.4.9 - arm64-v8a

It's possible that you'll need the OpenCV bindings too, not only the libopencv_java.so (never tried, I don't use Java).

2020-07-24 09:44:32 -0500 answered a question Will pay for libopencv_java.so v2.4.9 - arm64-v8a

It's possible that you'll need the OpenCV bindings too, not only the libopencv_java.so (never tried, I don't use Java).

2020-07-17 10:57:55 -0500 answered a question show video and texts on single window

Create 2 images, one with the video feed (let's say 640x480), the other one with the text (in this case 160x480). Then u

2020-07-16 10:36:47 -0500 commented question Undocumented HighGui functions

Yep...then maybe they should be removed from the docs...

2020-07-16 10:18:42 -0500 commented answer How to extract the profile data from the Mat?

...and the Plot2D class to draw nice line charts (which is part of the extra modules, so it isn't included by default, y

2020-07-16 10:14:57 -0500 asked a question Undocumented HighGui functions

Undocumented HighGui functions There are some functions in the HighGui module that lack any explanation/documentation. I

2020-07-15 10:49:38 -0500 commented question Change a particular color in an Image Python

Attention: in a "normal" image (like a photo) the values of the pixels change a lot: there is noise, difference in expos

2020-07-13 08:05:28 -0500 commented answer OpenCV Background Subtraction Get Color Objects (Python)

Check the docs for the syntax. Debug the code. See what's not working. Generally I don't test the code, I don't have ti

2020-07-13 04:52:00 -0500 commented question Laser pointer ideas?

You can use a Harris detector or a high pass filter to detect a point (and eliminate the other green zones).

2020-07-12 14:44:21 -0500 commented question Laser pointer ideas?

@supra56 The daylight has a strong infrared component, so using an IR camera won't help. You need a SWIR (short wave inf

2020-07-06 09:35:14 -0500 commented question Laser pointer ideas?

Normally the pointer is much brighter than the background, so it should be possible to detect it. In fact the problem wi

2020-07-06 04:24:25 -0500 commented question Laser pointer ideas?

some example images?

2020-07-05 15:16:24 -0500 commented question Existing models on images of cars taken horizontally?

I don't understand what's the link between the OpenCV library and a DNN dataset...????

2020-07-01 05:17:47 -0500 commented answer Compile Error after Install on Ubuntu with CUDA

It is not deprecated, just the default value is false. To generate the pkg-config file, just pass -DOPENCV_GENERATE_PKGC

2020-06-25 04:35:49 -0500 commented question Python3 can I replace waitKey() with an input using curses?

One mode comment: waitKey works in the window's event loop, while curses only works in the terminal (command line). So

2020-06-25 03:37:00 -0500 commented question yolov4 support

Anyay, Darknet supports OpenCV, so it can run the detection on cv::Mat images...

2020-06-18 06:47:33 -0500 commented question How to use OpenVINS Library

...and what does it have to do with OpenCV?

2020-06-08 08:53:08 -0500 answered a question find corners coordinates of a circle grid

@mvuori's answer is good, but it can give bad results if the grid has an important angle (~45°) with the picture axis.

2020-06-02 02:13:27 -0500 commented answer what contains cv::Mat data

Yes, you can rebuild an image like that. Mat.data contains the image data, only in C++ you must give a type (uchar*) as

2020-05-28 10:30:14 -0500 edited answer image segmentation

As the definition above says, segmentation is partitioning the image into different regions. You can imagine these regi

2020-05-28 10:21:28 -0500 edited answer image segmentation

As the definition above says, segmentation is partitioning the image into different regions. You can imagine these regi

2020-05-28 10:18:20 -0500 answered a question image segmentation

As the definition above says, segmentation is partitioning the image into different regions. You can imagine these regi

2020-05-28 09:45:20 -0500 edited answer Is there a function to average (mean) filter for a pixel?

That is called inpainting. [edit] By the way, the inpainting is a more intelligent method than getting a mean of the su

2020-05-28 05:47:59 -0500 answered a question Is there a function to average (mean) filter for a pixel?

That is called inpainting.

2020-05-27 04:06:29 -0500 edited answer what contains cv::Mat data

The img32bit.data is a generic pointer to the image data. Its content depends on the image type. Just cast it to the des

2020-05-27 03:59:33 -0500 answered a question what contains cv::Mat data

The img32bit.data is a generic pointer to the image data. Its content depends on the image type. Just cast it to the des

2020-05-25 05:05:21 -0500 commented answer Python OpenCV: Canny Edge Detection for Stickerless Rubik's Cube

Yep, this method works best for unsolved cubes. Anyway, seeing the actual picture... maybe you could try to detect the

2020-05-22 04:31:34 -0500 commented question No markers detected with aruco

just to be sure: is the attached marker part of the DICT_ARUCO_ORIGINAL? Did you try with other markers?

2020-05-22 04:25:08 -0500 answered a question Python OpenCV: Canny Edge Detection for Stickerless Rubik's Cube

Can you post an example image? Maybe you can use some contraints if you know the position of the camera/cube. Anyway, I

2020-05-19 06:13:18 -0500 answered a question Separating conjoined blobs

My idea is the following: Fill the "hollow circles" in the binary image: using the negative of the first image in post