shapes

How to detect an octagonal shape in Python and Opencv

送分小仙女□ 提交于 2020-02-28 09:38:48
问题 I am working on a shape detection algorithm with opencv in python . I am using Contours from the library and I have had some shapes being detected successfully: Circle, Rectangle and Triangle. The only problem is that I only need to detect circles rectangles and octagons. Also, the circle was working, but inconsistently. So, this is my code: import cv2 import numpy as np def nothing(x): # any operation pass cap = cv2.VideoCapture(1) cv2.namedWindow("Trackbars") cv2.createTrackbar("L-H",

How to detect an octagonal shape in Python and Opencv

时光总嘲笑我的痴心妄想 提交于 2020-02-28 09:38:29
问题 I am working on a shape detection algorithm with opencv in python . I am using Contours from the library and I have had some shapes being detected successfully: Circle, Rectangle and Triangle. The only problem is that I only need to detect circles rectangles and octagons. Also, the circle was working, but inconsistently. So, this is my code: import cv2 import numpy as np def nothing(x): # any operation pass cap = cv2.VideoCapture(1) cv2.namedWindow("Trackbars") cv2.createTrackbar("L-H",

How to detect an octagonal shape in Python and Opencv

倾然丶 夕夏残阳落幕 提交于 2020-02-28 09:38:29
问题 I am working on a shape detection algorithm with opencv in python . I am using Contours from the library and I have had some shapes being detected successfully: Circle, Rectangle and Triangle. The only problem is that I only need to detect circles rectangles and octagons. Also, the circle was working, but inconsistently. So, this is my code: import cv2 import numpy as np def nothing(x): # any operation pass cap = cv2.VideoCapture(1) cv2.namedWindow("Trackbars") cv2.createTrackbar("L-H",

What is the Data value of plus sign in Path

故事扮演 提交于 2020-01-23 11:16:07
问题 How to draw plus and minus signs in using data property in Path object. This is my triangle path object. I need to change it to plus symbol. <Path x:Name="trianglePath" Data="M 0 8 H 12 V 15 Z"/> 回答1: Here, I've created a plus and minus sign which is 10 x 10 pixels using XAML path markup syntax: <Path Margin="10" Stroke="White" Data="M0,5 H10 M5,5 V10Z" StrokeThickness="2" Height="10" Width="10" /> <Path Margin="10" Stroke="White" Data="M0,5 H10" StrokeThickness="2" Height="10" Width="10" />

Sensing hover over outer edge of a Path2D circle in JPanel [duplicate]

给你一囗甜甜゛ 提交于 2020-01-11 13:54:07
问题 This question already has an answer here : Collision detection with complex shapes (1 answer) Closed 5 years ago . So, I have a program that draws Path2D circles onto JPanel. What I am trying to do is resize the circle when the user clicks and drags the bottom right of the circle. So, what I want is to detect when they are on the bottom-right outer edge of the circle, not the bottom-right of the bounds around the circle . Basically, I need to figure out how to do something like this: I know

How to break this shape reference code in 2 lines?

…衆ロ難τιáo~ 提交于 2020-01-05 04:21:31
问题 This code works fine, but i have my sheet BLOCKED for selections. Sheets("sheet1").Shapes("test_" & i).Select Selection.Formula = "" ...and i want to to this: Sheets("sheet1").Shapes("test_" & i).Formula = "" But i got the object error to not accept this prop or method. What am i missing? 回答1: Formula is a property of the DrawingObject property: Sheets("sheet1").Shapes("test_" & i).DrawingObject.Formula = "" For an activeX textbox (assuming you want to change the LinkedCell property): Dim tb

“Beveled” Shapes in Quartz 2D

寵の児 提交于 2020-01-04 09:13:50
问题 I'm familiar with some of the basics of Quartz 2D drawing, like drawing basic shapes and gradients and so on, but I'm not sure how to draw a shape with a "beveled" look, like this: beveled circle http://www.shaggyfrog.com/junk/beveled-circle.jpg Essentially we've got a shine on one corner, and maybe some shading in the opposite corner. I think -- I didn't make this image, although I'd like to be able to approximate it. Any ideas? This is on the iPhone, and I'd like to use built-in frameworks

How to apply ShapeStyle to a specific Series of a Chart in Excel using VBA?

痴心易碎 提交于 2020-01-04 01:57:08
问题 How do I programatically apply a ShapeStyle to a set of Points from a single Series of a Chart using vba? It seems I need a "Shapes" object that contains only the points from the series I am trying to format? Some information is here: http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/ under the "Setting Border and Fill Styles" section I have pseudocode but I have no idea how to create the Shapes object with only the items I want in it ' Applies desired

How to show image view in Circle? [duplicate]

孤者浪人 提交于 2020-01-01 22:28:44
问题 This question already has an answer here : How to create a circular ImageView in Android? [duplicate] (1 answer) Closed 5 years ago . I'm going on with image view to pic from gallery or take picture from camera after all process we view the image in a square by default can we change the view to circle shape by default using SDK in Android. Is there any possibility with out cropping the image only by using SDK. If anyone have idea about this please help me guys. 回答1: There are a lot of library

Programmatically convert SVG shapes to paths (lineto, moveto)

坚强是说给别人听的谎言 提交于 2020-01-01 09:04:48
问题 I have an SVG file coming from Inkscape, Illustrator, or any other application. I want to convert the shapes to lineto , moveto , curveto format. What I want is something like: ./Appname svgfile outfilewithpath I will give the SVG file as an argument, then my application will convert the object into the respective paths. 回答1: Inkscape has a command-line interface. Use the Inkscape man page along with the verb source for reference: The ObjectToPath verb converts an object to a path: inkscape