{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Using Camera Arrays\n\nThis example demonstrates how to create and visualize a `CameraArray`, which\ncombines multiple individual camera views into a single, wide field-of-view image.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import datetime\nfrom arguslib.camera.camera_array import CameraArray\nfrom arguslib.camera.undistorted_camera import UndistortedCamera\nfrom arguslib.camera.camera import Camera\n\ndt = datetime.datetime(2025, 3, 25, 9, 0, 0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Creating a Basic Camera Array\n\nA `CameraArray` can be created from a configuration file. By default, it uses\nthe standard `Camera` class for each camera in the array. The `show()` method\nplots the images from all cameras, stitched together.\n\nNote the visible lens distortion (barrel distortion) at the edges of the\ncombined image.\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "basic_array = CameraArray.from_config(\"COBALTArray\")\nax = basic_array.show(dt)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Using Undistorted Cameras in an Array\n\nTo correct for lens distortion, we can specify `UndistortedCamera` as the\n`camera_class` when creating the array. This produces a more natural-looking\ncomposite image, which is especially useful for wide-angle views.\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "undistorted_array = CameraArray.from_config(\n \"COBALTArray\", camera_class=UndistortedCamera\n)\nax = undistorted_array.show(dt)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.5" } }, "nbformat": 4, "nbformat_minor": 0 }