Ch OpenCV for interactive open architecture computer vision

Qingcang Yu, Harry H. Cheng, Wayne W Cheng, Xiaodong ZhouAdvances 2004 · DOI

TL;DR

This paper introduces Ch OpenCV, a novel software package that combines the interactive scripting capabilities of the Ch interpreter with the powerful computer vision functionalities of OpenCV. This integration enables rapid prototyping, web-based applications, and easier learning of computer vision techniques by allowing users to execute C/C++ code interpretively without the traditional compile-link-debug cycle.

What Problem Does This Paper Address?

The field of computer vision has seen tremendous growth, leading to the development of numerous sophisticated software packages. Many of these are written in C/C++ for performance, making them powerful but also complex to develop and iterate on. This complexity creates a barrier for rapid prototyping, web integration, and educational purposes. While tools like MATLAB and Mathematica offer high-level interfaces, they may not always be suitable for direct integration with existing C/C++ vision libraries. The authors aim to bridge this gap by providing an interactive, open-architecture environment that leverages the strengths of both a C interpreter and a leading computer vision library.

Methods

The core innovation is the integration of the Ch interpreter with the OpenCV library. Ch is described as a C interpreter that extends the ISO C standard with features like object-oriented programming and a universal shell. OpenCV is a well-established, open-source library for computer vision algorithms.

The integration involves several key aspects:

  • Interactive Execution: Ch allows C/C++ programs using OpenCV to be run interpretively, eliminating the need for compilation and linking for every code change. This significantly speeds up the development cycle.
  • Seamless Library Integration: Ch's SDK allows it to integrate with existing C/C++ libraries, including OpenCV. This is achieved through wrapper functions that bridge the Ch scripting space and the C binary library space.
  • Dynamic Loading: The system utilizes dynamic loading of libraries (DLLs) to interface Ch programs with OpenCV functions. This involves creating "chf" (Ch function) files that call "chdl" (Ch dynamic link) functions, which in turn invoke the actual OpenCV functions.
  • Web Integration: Ch's CGI toolkit is leveraged to create web-based applications. This allows users to upload images and perform computer vision tasks remotely through a web browser.

Datasets

The paper uses the "baboon.jpg" image for demonstration purposes in its examples. No new datasets were introduced.

Key Insights and Ideas

  • Bridging the Gap: Ch OpenCV effectively bridges the gap between high-performance C/C++ development and the need for rapid iteration and interactivity in computer vision.
  • Democratizing Computer Vision: By simplifying the development process, Ch OpenCV makes advanced computer vision techniques more accessible for students, researchers, and developers.
  • Web-Enabled Vision: The integration with Ch's CGI capabilities opens up possibilities for easily deploying computer vision applications on the web, allowing for remote image analysis.
  • Flexibility and Extensibility: The open architecture allows for easy integration with other C/C++ libraries, making Ch OpenCV a versatile platform.

Key Results

The paper demonstrates the functionality of Ch OpenCV through three examples:

  1. Thresholding: A simple image thresholding operation is performed interactively, showcasing the ability to load, process, and display images.
  2. Image Histogram: The paper shows how to calculate and display the histogram of a grayscale image, highlighting Ch's numerical and plotting capabilities.
  3. Web-Based Edge Detection: A web application is presented where users can upload an image and apply the Canny edge detection algorithm, demonstrating the power of Ch OpenCV for interactive web services. The results are visually presented, showing the original image and the processed output.

Limitations and Future Work

  • Limitations: The paper does not explicitly detail performance comparisons between interpreted Ch code and compiled C/C++ code for computationally intensive tasks. The reliance on dynamic linking might introduce overhead.
  • Future Work: The authors suggest that Ch OpenCV is suitable for many applications in computer vision, implying potential for further exploration in areas like real-time processing, embedded systems, and more complex vision tasks. The embeddable nature of Ch also suggests its use as a scripting engine within larger applications.

Summary updated

BibTeX
@inproceedings{yu2004ch,
  author = {Qingcang Yu and Harry H. Cheng and Wayne W Cheng and Xiaodong Zhou},
  title = {{Ch OpenCV for interactive open architecture computer vision}},
  booktitle = {Advances},
  year = {2004},
  doi = {10.1016/j.advengsoft.2004.05.003},
}
Figure