[Scene:]
I am working on a game project.In a part of my project,I have to do following things.
1.Read a image
2.Detect face(I am using opencv)
3.view in my imgui window using ImGUi::image()
I already have abstracted my texture object working fail~safe(without any runtime error).I also abstracted a class integerating use of opencv.That part is also fail~safe.
Opencv reads imagefile and detects face and return its unsigned char*(format demanded by opengl)which later fed to my texture object..creating Opengl texture
ImGui requires opengl texture id to render an image using ImGui::image()function..After all my texture is ready,so no problem in calling the function
[Problem:]
I tried drawing two different image
1.Whole image(512x512)
2.The facial part of Whole image(173x173)
Whole image is rendered quite well.but when i render facial part image seems to shear or say disort..why?i mean it is not rendered correctly...
This the first part i did...I read lena.jpg and rendered whole image in imgui window...this was the result
And then in second part i detected face using opencv and fed to gl texture the face ROI and rendered the image.But result was this
both imageg are square matrix..one is rendered well while other is not..How shall i fix this

