Embedded Camera System

ModnyCo successfully developed a high-performance, multithreaded API for an embedded Linux system running on a multi-core ARM Cortex microprocessor. This advanced system was designed to handle an impressive data throughput of up to 650 MB per second, connecting to multiple cameras with variable frame rates and resolutions. The API offered seamless integration with various camera types, maintaining uniform functionality across different manufacturer standards while ensuring efficient memory management and data processing in real-time.

  • Developed an API for a multi-core ARM Cortex microprocessor system to connect to multiple cameras.
  • Managed variable camera frame rates (1 to 60 fps) and frame and pixel resolutions (8, 10, 12 bit), handling data throughput of 650MB per second.
  • Implemented the API in C++ within a Linux environment for interfacing and managing camera feeds and buffering the frames.
  • Utilized a multithreaded approach for non-blocking frame handling and efficient memory management.
  • Employed memory locking mechanisms to determine frame availability for deletion or replacement, preventing data loss during pre and post processing.
  • Adapted the API to work with different types of cameras from various manufacturers, ensuring uniform functionality.
  • Created a uniform user interface for varying camera settings (exposure time, framerate, gain) across different camera standards.
  • Enabled camera setup and configuration via JSON files for ease of use and flexibility in camera management.

ModnyCo embarked on a project that was both complex and exhilarating, showcasing our expertise in handling high-volume data and diverse camera systems. The challenge was to design an embedded system using a multi-core microprocessor with ARM Cortex architecture, capable of connecting to multiple cameras with variable frame rates and resolutions.
Each camera in the system had the capability to operate at speeds ranging from 1 to 60 frames per second, with adjustable pixel resolutions of 8, 10, or 12 bit. This variability meant that the data throughput could reach a maximum of 650 MB per second. Our task was to develop an object-oriented API in C++, running in a Linux environment, to manage this complex camera ecosystem.

The core requirement of the API was to handle the camera feeds and buffering in a multithreaded manner. This approach was essential due to the high data throughput and the need for non-blocking frame handling processes. We had to ensure efficient and reliable memory management to avoid any duplication of frames in the memory. A significant challenge was ensuring that frames in the buffer, whether under pre or post processing, were not inadvertently replaced or deleted by the incoming camera feed.

To standardize the pre and post processing interfaces, we employed GStreamer and OpenCV, ensuring that users could interact with the API in a standardized way. This integration facilitated seamless handling of camera feeds, allowing for consistent and efficient processing across various stages.

To effectively navigate this challenge, we implemented robust memory-locking mechanisms within the API. These mechanisms were designed to accurately track and manage the status of each frame in the buffer. Through this system, we could determine whether a frame was free to be deleted or replaced, or if it was currently being processed by other threads. This precise memory locking was pivotal in avoiding situations where frames under preprocessing or final processing might inadvertently be replaced or deleted due to new incoming camera feeds.

Another layer of complexity was introduced by the diversity of camera types from various manufacturers, each offering unique features and operating with different APIs. Regardless of the underlying camera interface, the developed camera interface provided a uniform system for users to operate all cameras in a consistent manner.

Additionally, we addressed the challenge of changing the camera settings (such as exposure time, framerate, gain, etc.), which often differ in terminology and units across manufacturers. Our API created a standardized interface, normalizing these controls and units across multiple camera standards. To enhance usability, we enabled the setup of cameras with initial settings loaded from JSON files. This approach simplified the camera creation process, allowing clients to effortlessly manage multiple cameras and configure their specifications or models later, without any need for code modification. 

This project was a testament to ModnyCo's ability to navigate the complexities of high-data-throughput systems and interface harmonization across diverse hardware, reaffirming our commitment to delivering innovative, user-centric solutions.

Schedule a Consultation

Connect with our team to transform your complex concepts into market-ready electronic solutions.