Ask Your Question

Revision history [back]

After reading in the data apply either cvtColor(cap, cap, CV_BayerBG2BGR) , cvtColor(cap, cap, CV_BayerGB2BGR), cvtColor(cap, cap, CV_BayerGR2BGR) or cvtColor(cap, cap, CV_BayerRG2BGR) according to the bayer pattern of your camera.

After reading in the data apply either

  • cvtColor(cap, cap, CV_BayerBG2BGR) ,
  • cvtColor(cap, cap, CV_BayerGB2BGR),
  • cvtColor(cap, cap, CV_BayerGR2BGR) or
  • cvtColor(cap, cap, CV_BayerRG2BGR)

according to the bayer pattern of your camera.camera. If you do not know how the pattern is, just go for trial and error.