Questions tagged [shapes]

Questions related to drawing or defining shapes.

A shape is a geometric representation of some object, defined by the external boundaries which encompass the object.

For 2-D shapes like the circle, , and rectangle their shape is constructed of lines connected together.

3-D shapes are defined by a 2-D which envelopes the interior 3-D volume.

4362 questions
1
vote
2 answers

How to split one contour into two using different shapes?

I am new to opencv but I need to analyze thermal images of mice (see example image). The idea is (1) to keep only one contour, e.g. the whole mouse (that works more or less well) and (2) separate this contour into the tail and the rest of the body…
1
vote
1 answer

Cut out a custom shape from an image in P5.js

I am trying to create jigsaw puzzle shapes using P5.js. After creating puzzle shapes, I want to cut areas from main image into pieces. For that I have options of using GET() or COPY(): But both of them take fix height and width as parameter. How…
Nargis
  • 739
  • 7
  • 30
1
vote
1 answer

How to Fill P5.js Shape with an Image

I have created a shape using beginShape, endShape and curveVertex. My code looks like that: function setup() { createCanvas(400, 400); } function draw() { background(220); strokeWeight(5); point(84, 91); point(68, 19); point(21, 17); …
Nargis
  • 739
  • 7
  • 30
1
vote
2 answers

How would I nest a shape within a shape in Java?

I am trying to do an assignment involving bouncing shapes within a JPanel. Whenever shapes hit a side, they will bounce off in the other direction. I have already got the bouncing part working for normal shapes, but now I need to make a…
Jigglypuff
  • 1,433
  • 6
  • 24
  • 38
1
vote
1 answer

x and y must have same first dimension, but have shapes (50,) and (10,)

I want to plot a diagram with 2 arrays but it is not working. Output says: ValueError: x and y must have same first dimension, but have shapes (50,) and (10,) Thank u so much!!! import numpy as np import matplotlib.pyplot as plt p =…
1
vote
0 answers

React native, how to make a shape

i'm trying to made this in react native, I tried to had a square and an oval, i tried to have border radius in a singular square, but everytime i cannot reach this result. This is what i tried, but as i said i don't know how to reach this export…
Legeo
  • 784
  • 4
  • 20
  • 44
1
vote
2 answers

How to create this shape with css and html?

I want to create shape given in below image but I have this code that not meeting my requirement and i don't know any way to create this please help me to create this shape with HTML and CSS it should look like an image, thank you. .star …
Suraj-Ui
  • 196
  • 2
  • 14
1
vote
0 answers

Implement in JAVA a rectangle shape feature like in Paint

I want to implement a Rectangle shape feature exactly as in Paint in JAVA. I have built a program as following. I have built a class MyPaint where buttons and frame are defined. I have built another class inside the same program PadDraw, where a…
mfo12002
  • 41
  • 5
1
vote
1 answer

numpy arange function build array size error

When I use numpy arange function to build a numpy array, the size is not right when use shape to check. For example, if I build an array: np.arange(-5,6,1), the shape is (11,). However, when I build array:np.arange(-0.001,0.0011,0.0001), the shape…
jmin
  • 15
  • 3
1
vote
1 answer

How to mask out a region of a view

I am looking for advice on the best way to achieve the following with SwiftUI. I have a view with a red rounded rectangle corner, and a child view which is a rectangular blue box offset to the bottom of the parent. 1 However, I wish to mask out the…
nppatt
  • 13
  • 2
1
vote
1 answer

Cropping rectangular extensions from ROI in OpenCV

I have this image: I want to extract the rectangular extension highlighted below from the whole ROI.
1
vote
0 answers

Python Object Detection

I am Fairly new To python & Image Processing. Need Some Help Regarding object detection. Things I want to achieve . how much circle/coin is completed e.g(like in percentage) OR Dimensions of visible part of circle/coin e.g(length ,width) I'am…
irfan adil
  • 15
  • 5
1
vote
2 answers

SwiftUI: Apply a linear gradient to a shape using a Custom Class

How do I apply a linear gradient with a custom class that I made on a shape? For some reason it is not working for me. The foregroundColor is not working for me. RoundedRectangle(cornerRadius: 30) .frame(width:…
bain
  • 335
  • 1
  • 6
  • 17
1
vote
1 answer

How to select a shape in a subscene to allow me to make transformations

I currently am working on a program in javafx that asks the user for radius and height of a cylinder and once the user hits add, it creates a cylinder in the subscene. I was wondering how I can combine the setonmouseclicked event handler with the…
1
vote
1 answer

Qt widget shape from image

How can I create a widget or window that will be just a transparent image? I mean something like in this program: sakura script player What i tried is: label = QtGui.QLabel(None, QtCore.Qt.FramelessWindowHint |…
chapaev
  • 13
  • 3