I m trying to overlay image on frame marker but the image does not overlay properly and it is also not zoom-in or zoom-out when camera comes closer to marker or away from marker.
I used below post to get the coordinates
using this post i get x,y,width and height as below:
CGFloat x = ShaderUtils::minVal(s0.x,s1.x,s2.x,s3.x);
CGFloat y = ShaderUtils::minVal(s0.y,s1.y,s2.y,s3.y);
CGFloat width = ShaderUtils::maxVal(s0.x,s1.x,s2.x,s3.x) - x;
CGFloat height = ShaderUtils::maxVal(s0.y,s1.y,s2.y,s3.y) - y;
After this, I set this coordinates to imageview frame as below:
CGRect sBounds = CGRectMake(x, y, width, height);
myImageView.frame = sBounds;
But the view does not fit into marker's view and also it does not update x and y based on current coordinates once i move camera away from marker.
Please someone can point me what i m doing wrong?