When using C++ file for algorithm execution in iOS Project,I came across a problem where a function returns std::vector data of jpeg image.
I have been searching for this particular question of how to convert from std::vector< uchar > to NSData and convert it to UIImage.
But unfortunately found none with lot of trial and error I came across a solution which I am posting along with this question.