I am converting an image in YUV420 format to RGB image in opencv but im getting an Orange colored image after
converting
YUV420
RGB
opencv
Orange
the 1st problem is using the outdated c-api (it's dead & gone. please use c++ instead).
the 2nd problem is writing your own (slow and error prone) pixel loops
why not use :
cvtColor(crs,dst, CV_YUV2BGR); // or CV_YUV2BGR_I420
instead ?