Oct 27 2008

reading multiple cameras and multi-threading

Published by Martijn at 18:25 under PhD lab book

  • Instead of passing a pointer to a videostream from the main frame to the video engine and implicitly casting onto the abstract videostream class, three video streams are created in the main frame, explicitly cast to the respective abstract type, and put into a vector. The vector is copied into the videoengine inside the videoengine init method.
  • all references to the video stream are replaced by loops, reading all separate video streams and saving the current frame to the pImageRGBThis_[3] variable. All three streams should be read for each iteration, because they will be processed together afterwards.
  • Background subtraction of the video streams is now also done for all streams using a loop.
  • To prevent massive slowdownbecause of multiple processing, the OpenMP API is activated (brief tutorial). All loops considering parallelvideo processing are preceded with the “#pragma omp parallel for” rule to enable paralellisation by OpenMP.

Comments are closed at this time.