-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into multiprocessed-camera
- Loading branch information
Showing
24 changed files
with
499 additions
and
452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "" | ||
labels: bug | ||
assignees: "" | ||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Environment:** | ||
|
||
- Python: | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
name: Documentation | ||
about: Suggest a change to the documentation | ||
title: "" | ||
labels: documentation | ||
assignees: "" | ||
--- | ||
|
||
**Documentation** | ||
Describe where you believe documentation is missing or should be improved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "" | ||
labels: enhancement | ||
assignees: "" | ||
--- | ||
|
||
**Describe the feature you'd like** | ||
A clear and concise description of what you'd like to have in airo-mono. | ||
|
||
**Use cases** | ||
Describe for who and when your feature would be useful. | ||
|
||
**Possible implementation** | ||
Describe any ideas you have for how this could work. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
name: Question | ||
about: Ask a question about airo-mono | ||
title: "" | ||
labels: question | ||
assignees: "" | ||
--- | ||
|
||
**Question** | ||
Ask your question here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import cv2 | ||
from airo_camera_toolkit.calibration.fiducial_markers import detect_charuco_board, draw_frame_on_image | ||
from airo_camera_toolkit.cameras.zed2i import Zed2i | ||
from airo_camera_toolkit.utils import ImageConverter | ||
|
||
camera = Zed2i(fps=30) | ||
intrinsics = camera.intrinsics_matrix() | ||
|
||
window_name = "Charuco Pose" | ||
cv2.namedWindow(window_name, cv2.WINDOW_NORMAL) | ||
|
||
while True: | ||
image = camera.get_rgb_image_as_int() | ||
image = ImageConverter.from_numpy_int_format(image).image_in_opencv_format | ||
pose = detect_charuco_board(image, intrinsics) | ||
if pose is not None: | ||
draw_frame_on_image(image, pose, intrinsics) | ||
cv2.imshow(window_name, image) | ||
key = cv2.waitKey(1) | ||
if key == ord("q"): | ||
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
airo-dataset-tools/airo_dataset_tools/coco_tools/albumentations.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from typing import Any | ||
|
||
import albumentations as A | ||
import numpy as np | ||
from PIL import Image | ||
|
||
|
||
class PillowResize(A.Resize): # type: ignore | ||
"""Use Pillow (instead of OpenCV) to resize the input to the given height and width. | ||
always uses Bicubic interpolation. | ||
PIllow instead of Opencv because opencv does not adapt the filter size to the scaling factor, | ||
which creates artifacts in the output for large downscaling factors. | ||
cf. https://arxiv.org/pdf/2104.11222.pdf | ||
Args: | ||
height (int): desired height of the output. | ||
width (int): desired width of the output. | ||
p (float): probability of applying the transform. Default: 1. | ||
Targets: | ||
image, mask, bboxes, keypoints | ||
Image types: | ||
uint8, float32 | ||
""" | ||
|
||
def __init__( | ||
self, height: int, width: int, interpolation: Any = Image.BICUBIC, always_apply: bool = False, p: float = 1.0 | ||
): | ||
super(PillowResize, self).__init__(height, width, always_apply=always_apply, p=p) | ||
self.height = height | ||
self.width = width | ||
self.interpolation = interpolation | ||
|
||
def apply(self, img: np.ndarray, **params: dict) -> np.ndarray: | ||
return np.array(Image.fromarray(img).resize((self.width, self.height), self.interpolation)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.