Skip to content

Pupil: Image Processing Skills

SUMMARY

Pupil is a module in the Telekinesis SDK containing skills for image processing and low-level vision algorithms.

It provides a set of modular tools for preprocessing, filtering, and transforming images, enabling developers to build robust vision pipelines for robotics applications.

When to Use Pupil?

Use Pupil for robotics applications that require low-level image processing and preprocessing, such as:

  • Enhancing camera input for vision-guided pick-and-place
  • Preparing images for object detection or segmentation
  • Noise reduction and filtering for robot navigation
  • Real-time feature extraction for tracking or visual servoing
  • Camera calibration and image rectification in robotics pipelines

What Does Pupil Provide?

Pupil includes a collection of modular skills for:

  • Image filtering and enhancement
  • Noise reduction and smoothing
  • Geometric transformations and rectification
  • Basic computer vision algorithms for preprocessing

How to Use Pupil?

To use the skills from Pupil, simply use:

python
from telekinesis import pupil

Here is a minimal example:

python
from telekinesis import pupil
from datatypes import datatypes, io

# Load an image
image = io.load_image(filepath=datatypes.String("path/to/image.jpg"))

# Apply Gaussian blur
blurred_image = pupil.filter_image_using_gaussian_blur(
    image=image,
    kernel_size=datatypes.Int(5),
    sigma_x=datatypes.Float(1.0)
)

# Save the result
io.save_image(image=blurred_image, filepath=datatypes.String("output.jpg"))

Overview of Skills

SDK CallDescription
enhance_image_using_claheApplies Contrast Limited Adaptive Histogram Equalization.
enhance_image_using_auto_gamma_correctionApplies gamma correction for brightness adjustment.
enhance_image_using_white_balanceApplies white balance correction to remove color casts.
filter_image_using_bilateralApplies bilateral filtering for edge-preserving smoothing.
filter_image_using_blurApplies simple box blur for fast smoothing.
filter_image_using_boxApplies normalized box filter with depth control.
filter_image_using_gaussian_blurApplies Gaussian blur for smooth noise reduction.
filter_image_using_median_blurApplies median filtering to remove salt-and-pepper noise.
filter_image_using_laplacianApplies Laplacian operator for edge detection.
filter_image_using_sobelApplies Sobel operator for gradient-based edge detection.
filter_image_using_scharrApplies Scharr operator for improved gradient estimation.
filter_image_using_gaborApplies Gabor filter for texture and oriented feature detection.
filter_image_using_frangiApplies Frangi vesselness filter for detecting tubular structures.
filter_image_using_hessianApplies Hessian-based vesselness filtering.
filter_image_using_satoApplies Sato tubeness filter for ridge detection.
filter_image_using_meijeringApplies Meijering neuriteness filter for detecting thin structures.
filter_image_using_morphological_erodeErodes bright regions to remove small features.
filter_image_using_morphological_dilateDilates bright regions to fill gaps and expand features.
filter_image_using_morphological_closeCloses holes by applying dilation followed by erosion.
filter_image_using_morphological_openOpens regions by applying erosion followed by dilation.
filter_image_using_morphological_gradientComputes morphological gradient for edge detection.
filter_image_using_morphological_tophatExtracts small bright features using top-hat transform.
filter_image_using_morphological_blackhatExtracts small dark features using black-hat transform.
transform_image_using_pyramid_downsamplingDownsamples image with anti-aliasing for pyramid construction.
transform_image_using_pyramid_upsamplingUpsamples image for pyramid reconstruction.
transform_mask_using_blob_thinningApplies morphological thinning for skeletonization.
calculate_image_pcaComputes PCA on binary mask and visualizes centroid and principal axis.
calculate_image_centroidCalculates centroid of non-zero pixels in a binary mask.
convert_image_color_spaceConverts image between color spaces (e.g., BGR to RGB, RGB to HSV).
normalize_image_intensityNormalizes image intensity using minmax or histogram methods.
split_image_into_channelsSplits image into color channels (B, G, R).
merge_image_from_channelsMerges channel images into multi-channel image.
resize_imageResizes image by scale factor.
resize_image_with_aspect_fitResizes to target dimensions while preserving aspect ratio.
rotate_imageRotates image by angle in degrees.
translate_imageShifts image by dx and dy pixels.
pad_imagePads image on top, bottom, left, and right.
crop_image_centerCrops image to fixed dimensions, centered; pads if smaller.
crop_image_using_bounding_boxesCrops image using multiple bounding boxes.
crop_image_using_polygonCrops image using polygon mask.
bitwise_and_imagesPerforms bitwise AND between two images.
bitwise_or_imagesPerforms bitwise OR between two images.
bitwise_xor_imagesPerforms bitwise XOR between two images.
bitwise_difference_imagesPerforms absolute difference between two images.
bitwise_not_imagePerforms bitwise NOT (inversion) on image.
overlay_images_using_weighted_overlayBlends two images using weighted overlay.
project_pixel_to_camera_pointProjects pixel and depth to 3D point in camera coordinates.
project_camera_point_to_pixelProjects 3D camera point to pixel coordinates.
project_pixel_to_world_pointProjects pixel and depth to 3D point in world coordinates.
project_world_point_to_pixelProjects 3D world point to pixel coordinates.