You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use HoughLinesPointSet using OpenCVSharp but could not find any sample or working of the program. I have tried using OpenCV in python and was able to work but can't figure out how to do that in C#.
Environment
OpenCVSharp.Extensions and OpenCVSharp.Windows: 4.9.0.20240103
.Net TargetFramework: 8.0
OpenCV-Python: 4.10.0
Example code:
Sample code I ran in Python:
points = np.array([
[591.0, 750.0], [598.0, 750.0], [605.0, 751.0], [612.0, 751.0],
[619.0, 751.0], [626.0, 751.0], [633.0, 752.0], [640.0, 752.0],
[647.0, 752.0], [652.0, 752.0], [661.0, 752.0]
], dtype=np.float32)
points = points.reshape(-1, 1, 2)
rho_min, rho_max, rho_step = 0.0, 360.0, 1.0
theta_min, theta_max, theta_step = 0.0, math.pi / 2.0, math.pi / 180.0
min_votes = 20
line3d = []
img_size = (800, 800, 3)
image = np.zeros(img_size, dtype=np.uint8)
# Plot each point on the blank image
for point in points:
x, y = int(point[0][0]), int(point[0][1])
cv2.circle(image, (x, y), radius=3, color=(255, 0, 0), thickness=-1)
# Run HoughLinesPointSet if available
lines = cv2.HoughLinesPointSet(points, 1, 1, rho_min, rho_max, rho_step, theta_min, theta_max, theta_step)
What did you intend to be?
How do you run this same code in C#?
The text was updated successfully, but these errors were encountered:
Summary of your issue
I am trying to use HoughLinesPointSet using OpenCVSharp but could not find any sample or working of the program. I have tried using OpenCV in python and was able to work but can't figure out how to do that in C#.
Environment
OpenCVSharp.Extensions and OpenCVSharp.Windows: 4.9.0.20240103
.Net TargetFramework: 8.0
OpenCV-Python: 4.10.0
Example code:
Sample code I ran in Python:
What did you intend to be?
How do you run this same code in C#?
The text was updated successfully, but these errors were encountered: