Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@AleksandrPanov
Copy link
Contributor

@AleksandrPanov AleksandrPanov commented Sep 28, 2023

  • add formatting with pandas, add Checker, refactoring
  • add aruco DetectorParameters read/write
  • add statistics*

Here is an example of the program output:
image

@AleksandrPanov AleksandrPanov changed the base branch from master to develop September 28, 2023 15:12
Comment on lines -195 to +196
self.col_offset:self.col_offset + image.shape[1]] = image
self.col_offset:self.col_offset + image.shape[1]] = image
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tab refactoring

Comment on lines -333 to -354
def check_aruco(synthetic_aruco, marker_corners, marker_ids, accuracy, type_dist):
gold = {}
gold_corners, gold_ids = synthetic_aruco.aruco_corners.reshape(-1, 4, 2), \
synthetic_aruco.aruco_ids
for marker_id, marker in zip(gold_ids, gold_corners):
gold[int(marker_id)] = marker
dist = 0.
detected_count = 0
total_count = len(gold_ids)
detected = {}
if len(marker_ids) > 0:
for marker_id, marker in zip(marker_ids, marker_corners):
detected[int(marker_id)] = marker.reshape(4, 2)
for gold_id in gold_ids:
gold_corner = gold_corners[int(gold_id)]
if int(gold_id) in detected:
corner = detected[int(gold_id)]
loc_dist = get_norm(gold_corner, corner, type_dist)
if loc_dist < accuracy:
dist += loc_dist
detected_count += 1
return detected_count, total_count, dist
Copy link
Contributor Author

@AleksandrPanov AleksandrPanov Sep 28, 2023

Choose a reason for hiding this comment

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

move to @staticmethod

@AleksandrPanov AleksandrPanov marked this pull request as ready for review September 29, 2023 07:35
@AleksandrPanov AleksandrPanov marked this pull request as draft October 4, 2023 00:09
@AleksandrPanov AleksandrPanov marked this pull request as ready for review October 16, 2023 07:54
plt.rcParams["figure.subplot.right"] = 0.99


def print_category_frame(obj_type, category, statistics, accuracy, path):
Copy link
Contributor

Choose a reason for hiding this comment

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

bad function name. Not clear what it does.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed to get_and_print_category_statistic

Comment on lines 1 to 18
contourpy==1.1.1
cycler==0.12.0
fonttools==4.43.0
iteration-utilities==0.11.0
kiwisolver==1.4.5
matplotlib==3.8.0
matplotlib-venn==0.11.9
numpy==1.24.2
opencv-python==4.8.1.78
packaging==23.2
pandas==2.1.1
Pillow==9.4.0
pyparsing==3.1.1
python-dateutil==2.8.2
pytz==2023.3.post1
scipy==1.11.3
six==1.16.0
tzdata==2023.3
Copy link
Contributor

Choose a reason for hiding this comment

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

The dependencies are to strict and some of them redundant. I propose to exclude numpy and opencv-python as the test version may differ from the requirements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

👍

@asmorkalov asmorkalov merged commit a9209e8 into opencv:develop Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants