2016-02-16 12:21:34 -0500 | asked a question | gpu::meanShiftSegmentation - Parameters? I've been trying to use gpu::meanShiftSegmentation to segment an image into a small number of clusters. My end goal of this would be to get results similar to this matlab code so i could use the OutputMat to find objects that have HUE and SATURATION values that stand out from the rest. Currently, i'm working on a test image of 240x320px, and trying some of the following parameters: But the number of different segments I am getting in the result image is way to high for such a small input image, 1000+ different segments meaning 1000+ different clusters. The problem is that I don't really understand how the parameters work so I am unable to tweak them to get the results I am looking for. Can anyone help me understand how "Spatial window radius", "Color window radius" and "criteria" work? I understand that larger numbers give a smaller number of segments, but I'm unable to get a small enough number of clusters (5-6 for this image) without losing my region of interest. |
2016-02-10 05:01:54 -0500 | answered a question | cuda::meanShiftSegmentation - Assertion Failed Error Can I bump this? Still can't figure out the problem :( |
2016-02-09 05:24:55 -0500 | received badge | ● Enthusiast |
2016-02-09 05:24:55 -0500 | received badge | ● Enthusiast |
2016-02-06 12:23:56 -0500 | asked a question | cuda::meanShiftSegmentation - Assertion Failed Error Hi. I'm new to using CUDA with OpenCV so this might be a very simple error but I'm kinda stuck. My code is the following: And i'm getting the following error: I understand that the meanShiftSegmentation only takes GpuMat of type 8UC4, but I am still to find a solution to convert it. Any ideas? std::cout << cuda::getCudaEnabledDeviceCount() << std::endl; returns 1 btw. |
2016-01-12 07:57:50 -0500 | commented answer | How to get OpenCV to store HSV in Matlab notation [0-1]? The latest edit should probably work. I did it like this though: Thanks. |
2016-01-12 07:57:23 -0500 | received badge | ● Scholar (source) |
2016-01-11 06:04:44 -0500 | commented answer | How to get OpenCV to store HSV in Matlab notation [0-1]? Yes, it didn't make any difference to the output. |
2016-01-11 03:50:31 -0500 | commented answer | How to get OpenCV to store HSV in Matlab notation [0-1]? @berak @Balaji R This still didn't solve my problem, as Hue still appears to be in the 0-180 range. Saturation and Value seem fine. This is my code and output. Output: Do you have any ideas why? |
2016-01-08 06:35:38 -0500 | received badge | ● Supporter (source) |
2016-01-08 06:35:34 -0500 | commented answer | How to get OpenCV to store HSV in Matlab notation [0-1]? I don't really understand how to include the above mentioned line in my code, just copy pasting gives me errors. Could you write the whole |
2016-01-08 05:59:43 -0500 | received badge | ● Editor (source) |
2016-01-08 05:56:07 -0500 | received badge | ● Student (source) |
2016-01-08 05:51:22 -0500 | asked a question | How to get OpenCV to store HSV in Matlab notation [0-1]? I am working on transferring a working Matlab project to C++/OpenCV, but I'm encountering a problem while converting from BGR to HSV, since the project is intended to work with small numbers that Matlab uses to store HSV values. If i just do a normalization to the HSV matrix (Hue/179, Saturation/255, Value/255) I will lose a part of data that could be important in the image recognition later on. Is there a better way to convert from BGR - HSV without losing part of the data? Has anyone encountered this problem? What is the most efficient way solve to it? Thanks Zvonimir |