Python programming environment compared to VisionX C environment

The VisionX core commands are programed in the C programming language. This language is efficient and with variants such as C++ is used for most industry applications where high run-time performance is an important consideration.

Python is a very popular high-level scripting language that has been used for computer vision research. While it is simple to develop programs, it is much less efficient than C. In many cases, python uses modules programmed in C to improve performance. The main differences between the VisionX C core programming tools and the current python VisionX environment are outlined below.

To access the VisionX interface tools in a python program import the v4 module typically by:


from v4 import vx

VisionX Python Restrictions

  1. Images are implemented with numpy arrays; therefore, the index range must start at zero. Furthermore, the origin for indexing is at the top left corner rather than the traditional lower left corner in VisionX. Hence, increasing the y index goes from top to bottom of the image.
  2. Because of the numpy indexing limitation the index offset must be explicitly included in the index expression when implementing window (convolution) functions.
  3. Python commands cannot be used as pipes; that is, the input files and output files must be given explicit file names and the command cannot directly read from or write to another command.