diff --git a/README.md b/README.md index 669daf9b..a1dfe09b 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,6 @@ from the camera can be used. - [get\_checkerboard\_pose\_from\_zdf](https://github.com/zivid/zivid-python-samples/tree/master/source/applications/advanced/get_checkerboard_pose_from_zdf.py) - Read point cloud data of a Zivid calibration board from a ZDF file, estimate the - [hand\_eye\_calibration](https://github.com/zivid/zivid-python-samples/tree/master/source/applications/advanced/hand_eye_calibration/hand_eye_calibration.py) - Perform Hand-Eye calibration. - - [mask\_point\_cloud](https://github.com/zivid/zivid-python-samples/tree/master/source/applications/advanced/mask_point_cloud.py) - Read point cloud data from a ZDF file, apply a binary - mask, and visualize it. - [project\_and\_find\_marker](https://github.com/zivid/zivid-python-samples/tree/master/source/applications/advanced/project_and_find_marker.py) - Show a marker using the projector, capture a set of 2D images to find the marker coordinates (2D and 3D). - [read\_project\_and\_capture\_image](https://github.com/zivid/zivid-python-samples/tree/master/source/applications/advanced/read_project_and_capture_image.py) - Read a 2D image from file and project it using the camera @@ -205,10 +203,10 @@ Note that Open3D is not available for Python 3.13 and later. ----- 1. [Install Zivid - Software](https://support.zivid.com/latest//getting-started/software-installation.html). + Software](https://support.zivid.com/en/latest//camera/getting-started/software-installation.html). 2. [Download Zivid Sample - Data](https://support.zivid.com/latest//api-reference/samples/sample-data.html). + Data](https://support.zivid.com/en/latest//camera/api-reference/samples/sample-data.html). 3. Check out the Zivid Python samples repository: @@ -252,9 +250,9 @@ Note that Open3D is not available for Python 3.13 and later. ## Support For more information about the Zivid cameras, please visit our -[Knowledge Base](https://support.zivid.com/latest). If you run into any -issues please check out -[Troubleshooting](https://support.zivid.com/latest/support/troubleshooting.html). +[Knowledge Base](https://support.zivid.com/en/latest). If you run into +any issues please check out +[Troubleshooting](https://support.zivid.com/en/latest/camera/support/troubleshooting.html). ## License diff --git a/modules/zividsamples/gui/preparation/warmup_gui.py b/modules/zividsamples/gui/preparation/warmup_gui.py index 53397347..37a64453 100644 --- a/modules/zividsamples/gui/preparation/warmup_gui.py +++ b/modules/zividsamples/gui/preparation/warmup_gui.py @@ -292,16 +292,24 @@ def rate_of_change_data(self) -> NDArray[Shape["N"], Float32]: # type: ignore return self.df["average_rate_of_change"].to_numpy() def temperature_is_stable(self) -> bool: + if not self.has_enough_data_to_analyze(): + return False + + # Ensure minimum warmup time of 1 minute has passed now = self.df["timestamp"].iloc[-1] + warmup_start_time = self.df["timestamp"].iloc[0] + elapsed_time = now - warmup_start_time + if elapsed_time < timedelta(minutes=1): + return False + one_minute_ago = now - timedelta(minutes=1) last_minute_of_data = self.df[self.df["timestamp"] >= one_minute_ago] - max_rate_of_change_in_the_last_minute = last_minute_of_data["average_rate_of_change"].max() - if self.has_enough_data_to_analyze(): - return ( - self.df["average_rate_of_change"].iloc[-1] is not None - and max_rate_of_change_in_the_last_minute <= self.temperature_change_threshold_degrees_per_minute - ) - return False + max_rate_of_change_in_the_last_minute = float(last_minute_of_data["average_rate_of_change"].max()) + + return ( + self.df["average_rate_of_change"].iloc[-1] is not None + and max_rate_of_change_in_the_last_minute <= self.temperature_change_threshold_degrees_per_minute + ) def temperature_is_changing_fast(self) -> bool: return self.df["average_rate_of_change"].iloc[-1] > 2 * self.temperature_change_threshold_degrees_per_minute diff --git a/modules/zividsamples/gui/widgets/live_2d_widget.py b/modules/zividsamples/gui/widgets/live_2d_widget.py index 5986aa38..b357ccc5 100644 --- a/modules/zividsamples/gui/widgets/live_2d_widget.py +++ b/modules/zividsamples/gui/widgets/live_2d_widget.py @@ -61,7 +61,7 @@ def update_exposure_based_on_relative_brightness(self, settings_2d: zivid.Settin rgba_with_projector = self.capture_function(settings_2d).image_srgb().copy_data() grayscale_with_projector = self.rgb_to_grayscale(rgba_with_projector) for acquisition in settings_2d.acquisitions: - acquisition.brightness = 0.0 + acquisition.brightness = 0.1 rgba_without_projector = self.capture_function(settings_2d).image_srgb().copy_data() grayscale_without_projector = self.rgb_to_grayscale(rgba_without_projector) grayscale_without_projector[grayscale_without_projector == 0] = np.nan @@ -82,7 +82,7 @@ def update_exposure_based_on_relative_brightness(self, settings_2d: zivid.Settin else relative_brightness / (exposure_increase / current_exposure_time) ) acquisition.gain = max(1.0, min(acquisition.gain * remaining_relative_brightness, 16.0)) - acquisition.brightness = 0.0 + acquisition.brightness = 0.1 return settings_2d def update_settings_2d(self, settings_2d: zivid.Settings2D, camera_model: str): diff --git a/source/applications/advanced/mask_point_cloud.py b/source/applications/advanced/mask_point_cloud.py deleted file mode 100644 index 42b8de5d..00000000 --- a/source/applications/advanced/mask_point_cloud.py +++ /dev/null @@ -1,117 +0,0 @@ -""" -Read point cloud data from a ZDF file, apply a binary mask, and visualize it. - -The ZDF file for this sample can be found under the main instructions for Zivid samples. - -""" - -import sys - -import numpy as np -import zivid -from zividsamples.display import display_depthmap, display_pointcloud, display_rgb -from zividsamples.paths import get_sample_data_path - -try: - import open3d as o3d -except ImportError: - print( - "⚠️ Failed to import Open3D. It is installed via `pip install -r requirements.txt`, " - f"however it might not be available for your Python version: {sys.version_info.major}.{sys.version_info.minor}. " - "See https://pypi.org/project/open3d/ for supported versions." - ) - sys.exit(1) - - -def _copy_to_open3d_point_cloud(xyz: np.ndarray, rgb: np.ndarray) -> o3d.geometry.PointCloud: - """Copy point cloud data to Open3D PointCloud object. - - Args: - xyz: A numpy array of X, Y and Z point cloud coordinates - rgb: RGB image - - Returns: - An Open3D PointCloud object - """ - xyz = np.nan_to_num(xyz).reshape(-1, 3) - rgb = rgb.reshape(-1, rgb.shape[-1])[:, :3] - - open3d_point_cloud = o3d.geometry.PointCloud(o3d.utility.Vector3dVector(xyz)) - open3d_point_cloud.colors = o3d.utility.Vector3dVector(rgb / 255) - return open3d_point_cloud - - -def _display_open3d_point_cloud(open3d_point_cloud: o3d.geometry.PointCloud) -> None: - """Display Open3D PointCloud object. - - Args: - open3d_point_cloud: Open3D PointCloud object to display - """ - visualizer = o3d.visualization.Visualizer() # pylint: disable=no-member - visualizer.create_window() - visualizer.add_geometry(open3d_point_cloud) - - print("Open 3D controls:") - print(" 1: RGB") - print(" 4: for point cloud colored by depth") - print(" h: for all controls") - visualizer.get_render_option().background_color = (0, 0, 0) - visualizer.get_render_option().point_size = 2 - visualizer.get_render_option().show_coordinate_frame = True - visualizer.get_view_control().set_front([0, 0, -1]) - visualizer.get_view_control().set_up([0, -1, 0]) - - visualizer.run() - visualizer.destroy_window() - - -def display_point_cloud_from_xyz_rgb(xyz: np.ndarray, rgb: np.ndarray) -> None: - """Display point cloud provided from 'xyz' with colors from 'rgb'. - - Args: - xyz: A numpy array of X, Y and Z point cloud coordinates - rgb: RGB image - """ - open3d_point_cloud = _copy_to_open3d_point_cloud(xyz, rgb) - _display_open3d_point_cloud(open3d_point_cloud) - - -def _main() -> None: - # Application class must be initialized before using other Zivid classes. - app = zivid.Application() # noqa: F841 # pylint: disable=unused-variable - - data_file = get_sample_data_path() / "Zivid3D.zdf" - print(f"Reading ZDF frame from file: {data_file}") - - frame = zivid.Frame(data_file) - point_cloud = frame.point_cloud() - xyz = point_cloud.copy_data("xyz") - rgba = point_cloud.copy_data("rgba_srgb") - - pixels_to_display = 300 - print(f"Generating binary mask of central {pixels_to_display} x {pixels_to_display} pixels") - mask = np.zeros((rgba.shape[0], rgba.shape[1]), bool) - height = frame.point_cloud().height - width = frame.point_cloud().width - - h_min = int((height - pixels_to_display) / 2) - h_max = int((height + pixels_to_display) / 2) - w_min = int((width - pixels_to_display) / 2) - w_max = int((width + pixels_to_display) / 2) - mask[h_min:h_max, w_min:w_max] = 1 - - display_rgb(rgba[:, :, 0:3], title="RGB image") - - display_depthmap(xyz) - display_pointcloud(point_cloud) - - print("Masking point cloud") - xyz_masked = xyz.copy() - xyz_masked[mask == 0] = np.nan - - display_depthmap(xyz_masked) - display_point_cloud_from_xyz_rgb(xyz_masked, rgba) - - -if __name__ == "__main__": - _main() diff --git a/source/applications/advanced/stitch_using_robot_mounted_camera.py b/source/applications/advanced/stitch_using_robot_mounted_camera.py index b7b31703..a6f97c3d 100644 --- a/source/applications/advanced/stitch_using_robot_mounted_camera.py +++ b/source/applications/advanced/stitch_using_robot_mounted_camera.py @@ -56,6 +56,7 @@ def _options() -> argparse.Namespace: parser.add_argument( "--full-resolution", action="store_true", + default=False, help="Use full resolution for stitching. If not set, downsampling is applied.", ) @@ -77,8 +78,8 @@ def _stitch_point_clouds(directory: Path, full_resolution: bool) -> zivid.Unorga ValueError: If the number of ZDF files and robot pose files do not match. """ - zdf_files = list(directory.rglob("capture_*.zdf")) - pose_files = list(directory.rglob("robot_pose_*.yaml")) + zdf_files = sorted(list(directory.rglob("capture_*.zdf"))) + pose_files = sorted(list(directory.rglob("robot_pose_*.yaml"))) if not zdf_files or not pose_files or not (directory / "hand_eye_transform.yaml").exists(): raise FileNotFoundError("Required files are missing in the directory.") diff --git a/source/applications/basic/file_formats/convert_zdf.py b/source/applications/basic/file_formats/convert_zdf.py index a3204583..c5b8b6b9 100644 --- a/source/applications/basic/file_formats/convert_zdf.py +++ b/source/applications/basic/file_formats/convert_zdf.py @@ -2,7 +2,7 @@ Convert point cloud data from a ZDF file to your preferred format (PLY, PCD, XYZ, CSV, TXT, PNG, JPG, BMP). -Example: $ python convert_zdf.py --3d ply xyz csv --2d jpg png Zivid3D.zdf +Example: $ python convert_zdf.py Zivid3D.zdf --3d ply xyz csv --2d jpg png Available formats: PLY, PCD, XYZ, CSV, TXT - 3D point cloud @@ -11,17 +11,25 @@ """ import argparse +from dataclasses import dataclass from pathlib import Path import numpy as np import zivid from zivid.experimental.point_cloud_export import export_frame -from zivid.experimental.point_cloud_export.file_format import PCD, PLY, XYZ, ColorSpace +from zivid.experimental.point_cloud_export.file_format import PCD, PLY, XYZ, ColorSpace, IncludeNormals FORMATS_3D = ["ply", "pcd", "xyz", "csv", "txt"] FORMATS_2D = ["jpg", "png", "bmp"] +@dataclass(frozen=True) +class ConversionOptions: + linear_rgb: bool + unordered: bool + include_normals: bool + + def _options() -> argparse.Namespace: """Function for taking in arguments from user. @@ -31,7 +39,7 @@ def _options() -> argparse.Namespace: """ parser = argparse.ArgumentParser( description="Convert from a ZDF to your preferred format\ - \nExample:\n\t $ python convert_zdf.py --3d ply --linearRGB Zivid3D.zdf", + \nExample:\n\t $ python convert_zdf.py Zivid3D.zdf --3d ply --linearRGB", formatter_class=argparse.RawTextHelpFormatter, add_help=False, ) @@ -78,6 +86,12 @@ def _options() -> argparse.Namespace: action="store_true", help="To have point clouds be unordered instead of ordered (PLY, PCD)", ) + sub_arg_group.add_argument( + "--includeNormals", + dest="include_normals", + action="store_true", + help="To include normals in the point cloud (PLY, PCD)", + ) return parser.parse_args() @@ -105,50 +119,43 @@ def _flatten_point_cloud(point_cloud: zivid.PointCloud, linear_rgb: bool) -> np. return flattened_point_cloud[~np.isnan(flattened_point_cloud[:, 0]), :] -def _convert_to_3d(frame: zivid.Frame, file_path: Path, file_formats: list, linear_rgb: bool, unordered: bool) -> None: +def _convert_to_3d(frame: zivid.Frame, file_path: Path, file_formats: list, options: ConversionOptions) -> None: """Convert from frame to different 3D formats. Args: frame: A frame captured by a Zivid camera file_path: Full path of the file(s) to be converted file_formats: List of formats to convert to [PLY, PCD, XYZ, CSV, TXT] - linear_rgb: whether to save as linear RGB or sRGB for selected format(s) (default: False[sRGB]) - unordered: whether to save as unordered or ordered point cloud for PLY format (default: ordered) - + options: Conversion options for the export """ + incl_norm = IncludeNormals.yes if options.include_normals else IncludeNormals.no + color_space = ColorSpace.linear_rgb if options.linear_rgb else ColorSpace.srgb + for file_format in file_formats: file_name_w_extension = f"{file_path.parent / file_path.stem}.{file_format}" _3d_object = None if file_format == "ply": - if not linear_rgb and not unordered: - _3d_object = PLY(file_name_w_extension, layout=PLY.Layout.ordered, color_space=ColorSpace.srgb) - elif linear_rgb and not unordered: - _3d_object = PLY(file_name_w_extension, layout=PLY.Layout.ordered, color_space=ColorSpace.linear_rgb) - elif linear_rgb and unordered: - _3d_object = PLY(file_name_w_extension, layout=PLY.Layout.unordered, color_space=ColorSpace.linear_rgb) - elif not linear_rgb and unordered: - _3d_object = PLY(file_name_w_extension, layout=PLY.Layout.unordered, color_space=ColorSpace.srgb) + layout = PLY.Layout.unordered if options.unordered else PLY.Layout.ordered + _3d_object = PLY( + file_name_w_extension, + layout=layout, + color_space=color_space, + include_normals=incl_norm, + ) elif file_format == "pcd": - if not unordered: - print( - "NOTE: If you have configured the config file for PCD, points will be ordered. \ -If not they will be unordered. See https://support.zivid.com/en/latest/reference-articles/point-cloud-structure-and-output-formats.html#organized-pcd-format for more information." - ) - if linear_rgb: - _3d_object = PCD(file_name_w_extension, color_space=ColorSpace.linear_rgb) - else: - _3d_object = PCD(file_name_w_extension, color_space=ColorSpace.srgb) + layout = PCD.Layout.unorganized if options.unordered else PCD.Layout.organized + _3d_object = PCD(file_name_w_extension, color_space=color_space, include_normals=incl_norm, layout=layout) elif file_format == "xyz": - if linear_rgb: - _3d_object = XYZ(file_name_w_extension, color_space=ColorSpace.linear_rgb) - else: - _3d_object = XYZ(file_name_w_extension, color_space=ColorSpace.srgb) + _3d_object = XYZ(file_name_w_extension, color_space=color_space) elif file_format in ("csv", "txt"): np.savetxt( - file_name_w_extension, _flatten_point_cloud(frame.point_cloud(), linear_rgb), delimiter=",", fmt="%.3f" + file_name_w_extension, + _flatten_point_cloud(frame.point_cloud(), options.linear_rgb), + delimiter=",", + fmt="%.3f", ) print(f"Saving the frame to {file_name_w_extension}") @@ -206,41 +213,27 @@ def _main() -> None: raise ValueError(f"{user_options.path} does not contain any ZDF files") if user_options.all or (not user_options.formats_3d and not user_options.formats_2d): + user_options.formats_3d = FORMATS_3D + user_options.formats_2d = FORMATS_2D + + options = ConversionOptions( + linear_rgb=user_options.linear_rgb, + unordered=user_options.unordered, + include_normals=user_options.include_normals, + ) + + if user_options.formats_3d: + for frame, file_name in frames: + _convert_to_3d(frame, file_name, user_options.formats_3d, options) + + if user_options.formats_2d: for frame, file_name in frames: - user_options.formats_3d = FORMATS_3D - user_options.formats_2d = FORMATS_2D - _convert_to_3d( - frame, - file_name, - user_options.formats_3d, - user_options.linear_rgb, - user_options.unordered, - ) _convert_to_2d( frame, file_name, user_options.formats_2d, user_options.linear_rgb, ) - else: - if user_options.formats_3d: - for frame, file_name in frames: - _convert_to_3d( - frame, - file_name, - user_options.formats_3d, - user_options.linear_rgb, - user_options.unordered, - ) - - if user_options.formats_2d: - for frame, file_name in frames: - _convert_to_2d( - frame, - file_name, - user_options.formats_2d, - user_options.linear_rgb, - ) if __name__ == "__main__": diff --git a/source/applications/point_cloud_tutorial.md b/source/applications/point_cloud_tutorial.md index b4ab9841..d01fc983 100644 --- a/source/applications/point_cloud_tutorial.md +++ b/source/applications/point_cloud_tutorial.md @@ -2,7 +2,7 @@ Note\! This tutorial has been generated for use on Github. For original tutorial see: -[point\_cloud\_tutorial](https://support.zivid.com/latest/academy/applications/point-cloud-tutorial.html) +[point\_cloud\_tutorial](https://support.zivid.com/en/latest/camera/academy/applications/point-cloud-tutorial.html) @@ -26,7 +26,7 @@ tutorial see: ## Introduction This tutorial describes how to use Zivid SDK to work with [Point -Cloud](https://support.zivid.com/latest//reference-articles/point-cloud-structure-and-output-formats.html) +Cloud](https://support.zivid.com/en/latest//camera/reference-articles/point-cloud-structure-and-output-formats.html) data. ----- @@ -41,7 +41,7 @@ Tip: **Prerequisites** - Install [Zivid - Software](https://support.zivid.com/latest//getting-started/software-installation.html). + Software](https://support.zivid.com/en/latest//camera/getting-started/software-installation.html). - For Python: install [zivid-python](https://github.com/zivid/zivid-python#installation) @@ -114,7 +114,7 @@ point_cloud = frame.point_cloud() Point cloud contains XYZ, RGB, and SNR, laid out on a 2D grid. For more info check out [Point Cloud -Structure](https://support.zivid.com/latest//reference-articles/point-cloud-structure-and-output-formats.html). +Structure](https://support.zivid.com/en/latest//camera/reference-articles/point-cloud-structure-and-output-formats.html). The function `zivid.frame.point_cloud()` does not perform any copying from GPU memory. @@ -132,7 +132,7 @@ functions (section below) will block and wait for processing to finish before proceeding with the requested copy operation. For detailed explanation, see [Point Cloud Capture -Process](https://support.zivid.com/latest/academy/camera/point-cloud-capture-process.html). +Process](https://support.zivid.com/en/latest/camera/academy/camera/point-cloud-capture-process.html). ----- @@ -199,10 +199,10 @@ In terms of memory allocation, there are two ways to copy data: ----- You may want to -[transform](https://support.zivid.com/latest//academy/applications/transform.html) +[transform](https://support.zivid.com/en/latest//camera/academy/applications/transform.html) the point cloud to change its origin from the camera to the robot base frame or, e.g., [scale the point cloud by transforming it from mm to -m](https://support.zivid.com/latest//academy/applications/transform/transform-millimeters-to-meters.html). +m](https://support.zivid.com/en/latest//camera/academy/applications/transform/transform-millimeters-to-meters.html). ([go to source](https://github.com/zivid/zivid-python-samples/tree/master//source/applications/advanced/hand_eye_calibration/utilize_hand_eye_calibration.py#L120)) @@ -248,7 +248,7 @@ stitched_point_cloud.extend(current_point_cloud.transform(transformation_matrix) Sometimes you might not need a point cloud with as `high spatial resolution (High spatial resolution means more detail and less distance between points)` as given from the camera. You may then -[downsample](https://support.zivid.com/latest//academy/applications/downsampling.html) +[downsample](https://support.zivid.com/en/latest//camera/academy/applications/downsampling.html) the point cloud. ----- @@ -256,7 +256,7 @@ the point cloud. Note: > [Sampling -> (3D)](https://support.zivid.com/latest/reference-articles/settings/sampling.html) +> (3D)](https://support.zivid.com/en/latest/camera/reference-articles/settings/sampling.html) > describes a hardware-based sub-/downsample method that reduces the > resolution of the point cloud during capture while also reducing the > acquisition and capture time. @@ -336,7 +336,7 @@ final_point_cloud = stitched_point_cloud.voxel_downsampled(0.5, 1) ## Normals Some applications require computing -[normals](https://support.zivid.com/latest//academy/applications/normals.html) +[normals](https://support.zivid.com/en/latest//camera/academy/applications/normals.html) from the point cloud. ([go to @@ -361,7 +361,7 @@ cloud from the point cloud object as well. No source available for {language\_name}For more information, check out [Visualization -Tutorial](https://support.zivid.com/latest/academy/applications/visualization-tutorial.html), +Tutorial](https://support.zivid.com/en/latest/camera/academy/applications/visualization-tutorial.html), where we cover point cloud, color image, depth map, and normals visualization, with implementations using third party libraries. @@ -372,8 +372,8 @@ manipulate it, transform it, and visualize it. ## Version History -| SDK | Changes | -| ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 2.16.0 | Added support for `Zivid::UnorganizedPointCloud`. `transformed` is added as a function to `Zivid::PointCloud` (also available in `Zivid::UnorganizedPointCloud`). | -| 2.11.0 | Added support for SRGB color space. | -| 2.10.0 | [:orphan:](https://support.zivid.com/latest/academy/camera/monochrome-capture.html) introduces a faster alternative to `downsample_point_cloud_tutorial`. | +| SDK | Changes | +| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 2.16.0 | Added support for `Zivid::UnorganizedPointCloud`. `transformed` is added as a function to `Zivid::PointCloud` (also available in `Zivid::UnorganizedPointCloud`). | +| 2.11.0 | Added support for SRGB color space. | +| 2.10.0 | [:orphan:](https://support.zivid.com/en/latest/camera/academy/camera/monochrome-capture.html) introduces a faster alternative to `downsample_point_cloud_tutorial`. | diff --git a/source/camera/basic/capture_tutorial.md b/source/camera/basic/capture_tutorial.md index df72dd8d..6fed5919 100644 --- a/source/camera/basic/capture_tutorial.md +++ b/source/camera/basic/capture_tutorial.md @@ -2,7 +2,7 @@ Note\! This tutorial has been generated for use on Github. For original tutorial see: -[capture\_tutorial](https://support.zivid.com/latest/academy/camera/capture-tutorial.html) +[capture\_tutorial](https://support.zivid.com/en/latest/camera/academy/camera/capture-tutorial.html) @@ -31,7 +31,7 @@ and 2D images. **Prerequisites** - Install [Zivid - Software](https://support.zivid.com/latest//getting-started/software-installation.html). + Software](https://support.zivid.com/en/latest//camera/getting-started/software-installation.html). - For Python: install [zivid-python](https://github.com/zivid/zivid-python#installation) @@ -105,7 +105,7 @@ As with all cameras there are settings that can be configured. ### Presets The recommendation is to use -[Presets](https://support.zivid.com/latest/reference-articles/presets-settings.html) +[Presets](https://support.zivid.com/en/latest/camera/reference-articles/presets-settings.html) available in Zivid Studio and as .yml files (see below). Presets are designed to work well for most cases right away, making them a great starting point. If needed, you can easily fine-tune the settings for @@ -143,9 +143,9 @@ settings.save(settings_file) Another option is to configure settings manually. For more information about what each settings does, please see [Camera -Settings](https://support.zivid.com/latest/reference-articles/camera-settings.html). +Settings](https://support.zivid.com/en/latest/camera/reference-articles/camera-settings.html). Then, the next step it's [Capturing High Quality Point -Clouds](https://support.zivid.com/latest/academy/camera/capturing-high-quality-point-clouds.html) +Clouds](https://support.zivid.com/en/latest/camera/academy/camera/capturing-high-quality-point-clouds.html) #### Single 2D and 3D Acquisition - Default settings @@ -337,13 +337,13 @@ frame.save(data_file) Tip: > You can open and view `Frame.zdf` file in [Zivid -> Studio](https://support.zivid.com/latest//getting-started/studio-guide.html). +> Studio](https://support.zivid.com/en/latest//camera/getting-started/studio-guide.html). ### Export In the next code example, the point cloud is exported to the .ply format. For other exporting options, see [Point -Cloud](https://support.zivid.com/latest//reference-articles/point-cloud-structure-and-output-formats.html) +Cloud](https://support.zivid.com/en/latest//camera/reference-articles/point-cloud-structure-and-output-formats.html) for a list of supported formats. ([go to @@ -435,10 +435,10 @@ image_2d = frame.frame_2d().image_bgra_srgb() ## File Camera A [file -camera](https://support.zivid.com/latest//academy/camera/file-camera.html) +camera](https://support.zivid.com/en/latest//camera/academy/camera/file-camera.html) allows you to experiment with the SDK without access to a physical camera. The file cameras can be found in [Sample -Data](https://support.zivid.com/latest/api-reference/samples/sample-data.html) +Data](https://support.zivid.com/en/latest/camera/api-reference/samples/sample-data.html) where there are multiple file cameras to choose from. ([go to @@ -478,7 +478,7 @@ settings.color = settings_2d ``` You can read more about the file camera option in [File -Camera](https://support.zivid.com/latest/academy/camera/file-camera.html). +Camera](https://support.zivid.com/en/latest/camera/academy/camera/file-camera.html). ## Multithreading diff --git a/source/camera/basic/quick_capture_tutorial.md b/source/camera/basic/quick_capture_tutorial.md index aed5b601..590819b7 100644 --- a/source/camera/basic/quick_capture_tutorial.md +++ b/source/camera/basic/quick_capture_tutorial.md @@ -2,7 +2,7 @@ Note\! This tutorial has been generated for use on Github. For original tutorial see: -[quick\_capture\_tutorial](https://support.zivid.com/latest/getting-started/quick-capture-tutorial.html) +[quick\_capture\_tutorial](https://support.zivid.com/en/latest/camera/getting-started/quick-capture-tutorial.html) @@ -29,7 +29,7 @@ capture point clouds. **Prerequisites** - Install [Zivid - Software](https://support.zivid.com/latest//getting-started/software-installation.html). + Software](https://support.zivid.com/en/latest//camera/getting-started/software-installation.html). - For Python: install [zivid-python](https://github.com/zivid/zivid-python#installation) @@ -92,7 +92,7 @@ frame.save(data_file_ply) ``` For other exporting options, see [Point -Cloud](https://support.zivid.com/latest//reference-articles/point-cloud-structure-and-output-formats.html) +Cloud](https://support.zivid.com/en/latest//camera/reference-articles/point-cloud-structure-and-output-formats.html) for a list of supported formats ## Utilize @@ -111,10 +111,10 @@ rgba = point_cloud.copy_data("rgba_srgb") Tip: 1. You can export Preset settings to YML from [Zivid - Studio](https://support.zivid.com/latest//getting-started/studio-guide.html) + Studio](https://support.zivid.com/en/latest//camera/getting-started/studio-guide.html) \#. You can open and view `Frame.zdf` file in [Zivid -Studio](https://support.zivid.com/latest//getting-started/studio-guide.html). +Studio](https://support.zivid.com/en/latest//camera/getting-started/studio-guide.html). .. rubric:: Conclusion This tutorial shows the most basic way to use the Zivid SDK to connect