Here are some useful tips which helped me a lot in programming with OpenCV and I recorded those here because I don't want to spend my time again to find such rare tips.
List
1. Problem which drawing primitives such as line, ellipse, text with certain NON-White scalar color on image of type cv::Mat produce only WHITE colored traces (RGB(255,255,255)).
Recommendation: Firstly, check whether the input image type is CV_8UC4. If so, then converted the input to CV_8UC4 using cvtColor(). Look below example.
cvtColor(image, image, CV_RGBA2BGR);
Whole story can be founded here.
2. To be added later...