{"id":23687809,"url":"https://github.com/dhbw-smart-rollerz/camera_preprocessing","last_synced_at":"2025-06-30T19:05:18.931Z","repository":{"id":253748722,"uuid":"843059195","full_name":"DHBW-Smart-Rollerz/camera_preprocessing","owner":"DHBW-Smart-Rollerz","description":"Camera pre-processing for Smarty","archived":false,"fork":false,"pushed_at":"2025-05-15T17:01:19.000Z","size":47782,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"jazzy","last_synced_at":"2025-05-22T03:37:46.597Z","etag":null,"topics":["base-package","ros2","smarty"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DHBW-Smart-Rollerz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-15T17:35:47.000Z","updated_at":"2025-05-15T17:01:23.000Z","dependencies_parsed_at":"2025-05-15T18:32:32.732Z","dependency_job_id":null,"html_url":"https://github.com/DHBW-Smart-Rollerz/camera_preprocessing","commit_stats":null,"previous_names":["dhbw-smart-rollerz/camera_preprocessing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DHBW-Smart-Rollerz/camera_preprocessing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DHBW-Smart-Rollerz%2Fcamera_preprocessing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DHBW-Smart-Rollerz%2Fcamera_preprocessing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DHBW-Smart-Rollerz%2Fcamera_preprocessing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DHBW-Smart-Rollerz%2Fcamera_preprocessing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DHBW-Smart-Rollerz","download_url":"https://codeload.github.com/DHBW-Smart-Rollerz/camera_preprocessing/tar.gz/refs/heads/jazzy","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DHBW-Smart-Rollerz%2Fcamera_preprocessing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262834786,"owners_count":23371849,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base-package","ros2","smarty"],"created_at":"2024-12-29T23:56:26.555Z","updated_at":"2025-06-30T19:05:18.909Z","avatar_url":"https://github.com/DHBW-Smart-Rollerz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Camera Preprocessing\n\nThis package is responsible for calibrating the camera and preprocessing the images. Therefore it provides the following two nodes:\n\n1. `camera_calibration_node`: Calibrates the camera\n2. `camera_preprocessing_node`: Preprocess the raw image\n\nAdditionally, it provides the following classes to transform points and images:\n\n1. `CoordinateTransform`: Transform points\n```python\nfrom camera_preprocessing.transformation.coordinate_transform import CoordinateTransform\n\ncordinate_transform = CoordinateTransform()\n\n# Transform your points with the provided methods\n```\n\n2. `Birdseye`: Transform images into birdseye\n```python\nfrom camera_preprocessing.transformation.calibration import Calibration\nfrom camera_preprocessing.transformation.birds_eyed_view import Birdseye\n\ncalib = Calibration()\nbev = Birdseye(calib)\n\n# Transform the img to birdseye view (bev)\nbev_img = bev.transform_img(img)\n```\n\nPlease Note that this package is mandatory for using images in the smarty pipeline.\n\n## Camera Calibration\n\nThe camera calibration is done on the full image. The node uses the camera configuration (`config/config.yaml`), the calibration board images and the position board image to calibrate the distortion, intrinsics and extrinsic of the camera.\n\n### Usage\n\nIt exists a launchfile to calibrate the camera:\n\n```bash\nros2 launch camera_preprocessing camera_calibration.launch.py\n```\n\n- `params_file`: Path to the ROS parameters file (default: `config/ros_params.yaml`).\n- `debug`: Enable debug mode to show further images and configs (default: `false`).\n- `chessboard_path`: Path to the chessboard image (default: `none`). With `none` the node will subscribe to the raw image topic and wait until it finds the chessboard.\n\n### Settings\n\nThe camera parameters are specified in `config/config.yaml` and contains the following parameters:\n\n- **recalibration_interval**: Interval in seconds between recalibration (default: 7 days or 604800 seconds).\n\n- **focal_length**: Focal length of the camera in millimeters. It is specified as a list with two values representing the focal length in the x and y directions.\n\n- **sensor_width_mm**: Width of the camera sensor in millimeters.\n\n- **sensor_height_mm**: Height of the camera sensor in millimeters.\n\n- **image_size**: Width and height of the image in pixels. It is specified as a list with two values.\n\n- **target_size**: Width and height of the target image in pixels. It is specified as a list with two values. This parameter can be used to resize the image to a different resolution.\n\n- **recalibrate**: Boolean flag indicating whether the camera should be recalibrated.\n\n- **calibration_board**:\n  - **board_size**: Size of the calibration board in terms of the number of squares along the width and height. It is specified as a list with two values.\n  - **square_size**: Size of each square on the calibration board in meters.\n\n- **method**: Method used for external camera calibration (e.g., \"chessboard\").\n    \u003e *Note:  This is the only currently implemented method*\n\n- **position_board**:\n  - **board_size**: Size of the position board in terms of the number of squares along the width and height. It is specified as a list with two values.\n  - **square_size**: Size of each square on the position board in meters.\n  - **world_points**: List of 3D coordinates representing the world points on the position board. Each point is specified as a list with three values representing the x, y, and z coordinates in meters.\n\nAdditionally the following topics are specified in the `config/ros_params.yaml` file:\n\n- **calibration_file**: Path to the calibration file where the calibration data will be saved (default: `\"config/calib.bin\"`).\n- **config_file**: Path to the configuration file containing camera parameters (default: `\"config/config.yaml\"`).\n- **calibration_images_path**: Path to the directory containing calibration images (default: `\"img/calib/Neue_3MP_Kamera/\"`).\n- **image_topic**: ROS topic from which raw camera images are received (default: `\"/camera/image_raw\"`).\n\n## Camera Preprocessing\n\nThe camera preprocessing node subscribes to the raw image and publishes the undistorted and birdseye view image on the specified topics.\n\n## Usage\n\nThe preprocessing can be started by launching the following command:\n\n```bash\nros2 launch camera_preprocessing camera_preprocessing.launch.py\n```\n\nThe following parameters exist:\n\n- `params_file`: Path to the ROS parameters file (default: `config/ros_params.yaml`).\n- `debug`: Enable debug mode to show further images and configs (default: `false`).\n\nExample for all parameters:\n```bash\nros2 launch camera_preprocessing camera_preprocessing.launch.py params_file:=/path/to/ros_params.yaml debug:=true\n```\n\n## Settings\nThe topics are defined as ros_parameters:\n- **calibration_file**: Path to the calibration file where the calibration data will be saved (default: `\"config/calib.bin\"`).\n- **config_file**: Path to the configuration file containing camera parameters (default: `\"config/config.yaml\"`).\n- **calibration_images_path**: Path to the directory containing calibration images (default: `\"img/calib/Neue_3MP_Kamera/\"`).\n- **position_calib_img_path**: Path to the image used for position calibration (default: `\"img/position/chessboard.png\"`).\n- **num_skip_frames**: Number of frames to skip between processing (default: `1`).\n- **image_topic**: ROS topic from which raw camera images are received (default: `\"/camera/image_raw\"`).\n- **undistorted_publisher_topic**: ROS topic to which the undistorted images are published (default: `\"/camera/undistorted\"`).\n- **birds_eye_publisher_topic**: ROS topic to which the bird's eye view images are published (default: `\"/camera/birds_eye\"`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhbw-smart-rollerz%2Fcamera_preprocessing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhbw-smart-rollerz%2Fcamera_preprocessing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhbw-smart-rollerz%2Fcamera_preprocessing/lists"}