Why is result of pattern along path no circle? - inkscape

I've tried this video tutorial and want to put a pattern along a path of a circle. The problem is now that the result is like a rectangle and not a circle. Can anybody tell me why?
Thanks!

Related

If I mask an SVG, how can I know if tha mask actually has something?

I have a project in which I need to recreate an SVG and animate it given some positions (x,y), and I am supposed to know which elements of the SVG are drawn in a certain position.
My first thought was to mask the elements of the SVG in the position I'm given. But how do I know if there's actually something in the mask? Because it could be empty right?
I have to do this using C++. Can anyone help me with this or suggest another idea?

Shape Detection Using OpenCv

I am working on Image Processing and for that i am using OpenCV Library in c++.
I have one image in which i want to detect particular shape and mainly want its point.
I have below image , where four black corners are there.I want to detect four corner points as i have drawn with red color.
And please note that image can be at any angle or position. Not straight always.
I have tried cv::threshold, canny, findContours, minAreaRect but I am not getting expected output.
Please anybody can help me.Thanks in Advance.
OpenCV has a function to detect corners using the Harris-Stephens method, here is a tutorial with C++ code example.

Opencv cv::findchessboardCorners

say we got a 8x9 chessboard, and the function cv::findChessboardCorners recognize it without problem, My question is why does the function not recognize in the same image a a chessboard with smaller size, I tried in a for-loop and decremented the size the function may recognize a chessboard of let say 5x4 and 4x5 but not 6x7 for example ?
any idea why is that happening ?
I already tried debugging the program and I didn't understand what really happens in calibinit.hpp
thanks in advance !
I think the main problem is that you would have ambiguities since it is easily possible to find different smaller chessboards in a larger one.
If you do corner detection on an image consisting of a chessboard, you will find a regular grid of corners.
Then findChessboardCorners needs to find a structur which is very similar to the given chessboard of size (x,y). It will rate the different possibilities to map the chessboard to the regular grid found by the corner detection and these ratings are very similar.
So it is difficult to decide which is THE CHESSBOARD, you are looking for.
It because the recognized board must have light border.

OpenCV C++ set ROI from a rectangular area

Anyone know how to set ROI based on image bellow?
I used Hough Transform to detect the white line and draw the red line into the image.
What I need to do is to set the ROI in the rectangle.
Since Hough Transform unable to get location of each rectangle and the main problem is I cannot defined the location (x,y) manually.
Any solution that able to auto detect the rectangle and set the ROI?
Anyone can give some idea for me or the code can be use?
Please forgive my poor english and thank you.
this blog post is very good in explaining how to find a rectangle with the hough transform and it has also some c++ code with opencv 2 API.
The approach is to find lines, intersect them, and find the rectangle. In your case you will have more rectangles and so it's a little bit more complicated..
But if you manage to obtain such image.. why don't use just some threshold and find connected regions (aka blob)?

Extract Rectangle From Contour OpenCV

after making some edge and corner detection and then find contours i have this output.
how i can crop this image and return only this rectangle using openCV
EDIT:
i tried cvBoundingRect and then setimageROI but the output image still having some background but i want the rectangle only
Thank You.
i hope you need the rectangle area you selected.
For this you need to make another grayscale image, let us call it 'mask'. Then draw the rectangle contour obtained on it and fill it with white (255,255,255). You will obtain an image like this ( all images hand-edited in paint program):
Now just have an bitwise_and operation on both the images. You will get result as this:
**NB:**Now if it is not the one you wanted, instead you wanted this kind of selection, You can find information about it in this SOF question (thanks to karl philip for the link) .
I guess Mustafa wants to get the box automatically? If not, please accept Abid's answer and ignore this one.
Otherwise:
As I don't know how far it should generalize, for this specific image, do hough transform, which gives you straight lines. However the line at the bottom can become false positive. But with some post processing, e.g. blur, dilate, you will be able to get rid of it. Or you could use the knowledge that the lines build a rectangle.