Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Add camera server code #13

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Add camera server code #13

wants to merge 4 commits into from

Conversation

AndrewLester
Copy link
Member

No description provided.

@AndrewLester AndrewLester changed the title Remove scipy dependency and setup server Add camera server code Jan 17, 2020
from networktables.util import ntproperty

from scipy.spatial.transform import Rotation

IMAGE_WIDTH = 1024
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you get these numbers?

cy = int(M['m01']/M['m00'])

cv2.drawMarker(source0, (cx, cy), (0, 255, 0), cv2.MARKER_DIAMOND, markerSize=5, thickness=2)
self.table.putString('moment', f'{cx} , {cy}')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this important to put in networktables?

Comment on lines +94 to +96
self.table.putNumber('angle_other', rot[0])
self.table.putNumber('angle_vertical', rot[1])
self.table.putNumber('angle_horizontal', rot[2])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the official terms are yaw, pitch, and roll.

Comment on lines +179 to +182
M = cv2.moments(contour)
cx = int(M['m10']/M['m00'])
cy = int(M['m01']/M['m00'])
# cv2.drawMarker(source0, (cx, cy), (0, 255, 0), cv2.MARKER_DIAMOND, markerSize=5, thickness=2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems repeated

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants