TI's Edge AI Processors, e.g. AM62A,
TDA4VM, AM68A, include an ISP and additional hardware accelerators for scaling
images (multiscaler MSC) and dewarping distortions from wide-angle lens (Lens
Distortion Correction LDC). The ISP, MSC, and LDC are all TI-designed IP within the
Vision Processor Accelerator (VPAC). This section will describe how an IMX219 image
sensor was used for this application.
Note: The retail-scanner demo also works with USB cameras in 720
and 1080p. When running, use the -c tag with either usb-720p or usb-1080p for 720 or
1080p USB input, resp. The C270 and C920 logitech USB cameras have both been
verified to work. The version of the GST pipeline uses USB input to simplify until
this point in the document.
An ISP (Image Signal Processor) is
necessary to take the raw output of an image sensor and process it into a more
typical format like RGB. Raw output sensors are cheaper and external ISP's
(including integrated ones like TI's) are more readily tunable than ISP's built into
the image sensor. The ISP can be tuned based on lighting conditions, lens effects,
auto-exposure, and so forth. TI has a tuning tool for the integrated ISP and supporting documentation.
The IMX219 is a low-cost sensor that
is supported out-of-box, and can capture at up to 8 MP at 15 fps or 2 MP at 30 fps
(2MP at 60fps is possible but requires a linux patch that is linked in SDK
documentation).
Supporting a sensor includes several components, all three
of which are available for the IMX219:
- A driver, ideally on that is
upstreamed to the mainline Linx kernel and actively maintained
- ISP tuning
- A hardware module for
evaluation
The retail-scanner demo required a
2-megapixel input at 30 fps and at least 70° field-of-view. Using this particular
sensor posed several challenges for this use case; these challenges and their
resolutions are described below:
- The driver has limited support
for different resolutions and formats
- The typical 16:9 aspect
ratio 1920x1080 (2MP) resolution does not have full field of view – it
is a cropping the full 8MP frame, and thus appears artificially zoomed
in. The result is far below the 70° FOV requirement.
- Full FOV with 4:3 aspect
ratio is possible with 1640x1232 (half resolution in width and height;
still 2 MP). However, the upstream driver only works as-is with 10-bit
pixel values (RGGB10). This mode is used for the retail-scanner
application, and the setup_cameras.sh script within the demo repository
is modified to set this configuration using the linux "media-ctl"
command-line tool.
- 60 fps is not supported
at 2MP resolutions - it runs at 30 fps. This is a result of the upstream
driver. The Edge AI processors from TI are capable of full 60 fps for
this sensor, but it requires a patch to the linux kernel, rebuild for
the driver module, and installation on the target.
- Different resolutions may require
changes to the ISP files (typically under /opt/imaging/imx219) – this required
the "DCC" files to be regenerated. That process is not covered in this
document.
- The 8.6 Edge AI SDK now
includes ISP configuration files for all resolution and bit-depths that
are possible with the upstream IMX219 driver.