|Improving circle detection|
analogue to my answers in Detect semi-circle in
opencv I see a problem: Don't extract canny edge
detection before hough circle detection, since
openCV houghCircle itself computes Gradient AND
canny. So what you are trying to do is to extract
canny from and edge image and detect circles in
that, leading to (in the best case) 2 new edges
around each edge => wrong way!
As it is done in the openCV tu
|Coordinate storage in cvmat header|
a boundingRect is used with a vector of Points,
not with a Mat of any kind.
Rect bounds = boundingRect(points);
cerr << bounds << endl;
[246 x 111 from (30, 30)]
also, please stay away from opencv's dep
|Add .so File To Android Studio , Execution failed|
With Android Studio, you have to put your .so
files inside jniLibs/(armeabi-v7a|x86|...) folder
if you want them to be included inside your APK.
If you have files under jni folder, Android Studio
will try to compile your sources using the NDK and
an auto-generated Makefile, that's certainly this
task that is currently failing with your project.
|OpenCV find polygons|
I think that the problem could be your image
I don't know how you did but you can get better
results if the binary image is better.
I like of your idea to connect the polygons
segment, try to secure that the line you will
connect has a maximum and minimum length to avoid
connect to nearest objects.
Verify if the new joint of lines forms 90 degrees
angle, even if its a corner.
|OpenCV 3.0 x64 VS2013 error LNK1104|
ok fixed it myself...
you have to add the files of opencv 3.0 under
for the linker input. (see additional
dependencies) which isnt the whole list anymore...
list on the official tutorial is not up to date!
|Opencv: What is the procedure for finding specific pattern in black background?|
If you want to filter on the number of contours
including in a contour of interest, you should use
the hierarchy variable. A possible code to do it
std::vector<int> > const& hierarchy,
for (size_t i = 0; i < hierarchy.size();
scores[i] = 0;
|Detecting geometrical shapes in a handwritten flow chart|
As you have only squared forms you can use hough
lines probabilistic from opencv. With it you will
obtain all small segments from flow chart. Try to
connect the lines found forming the charts
|OpenCV Sample Code in python|
There are a lot of examples, but I would suggest
in any case to give a look at the following
|CV - Extract differences between two images|
One problem in your code is cv::threshold which
only uses 1 channel images. Finding the pixelwise
"difference" between two images in only grayscale
often leads to unintuitive results.
Since your provided images are a bit translated or
the camera wasnt stationary, I've manipulated your
background image to add some foreground:
|Packing Pixel Data in OpenCV|
You can convert the pixel format from BGR to BGRA
See this example.