"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Get coordinates to overlay image

Hi, 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 [url]https://ar.qualcomm.at/arforums/showpost.php?p=3538&postcount=8[/url] 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? Thanks, Hardik

I would suggest drawing a tiny view (3pixels?) at each of s0..s3 in red to compare with your intended overlaid view, to help you diagnose the problem.

MaherSoua

Thu, 12/08/2011 - 11:55

Hi, I have the same problem, my x an y coordinate doesn't update for my UIImageView, how I can overlay image on the Image pattern? Please help there is 2 weeks that I try to add UIImageView with image sequence animation to the scene, the UIImageView appears but not in the good place and not using Ma

Here's what I did to prove that this works, combined with the suggestion in the original post: If you followed the original post, you should already have [B]GGPoint[/B]s s0..3 declared in the EAGLView. Modify the appDelegate 'didFinishLaunchingWithOptions' as follows: [CODE] viewController = [

indrajeet86

Tue, 12/13/2011 - 13:02

Hi, How do you manage to get x,y values ?? CGFloat x=ShaderUtils::minVal(s0.x,s1.x,s2.x,s3,x) Above line is not working for me- No member minVal for ShaderUtils. Any pointers on this ? Thanks in advance

Take a look at the first post in the thread - it references some sample code that uses the following to return a CGPoint value: [CODE]- (CGPoint) projectCoord:(CGPoint)coord inView:(const QCAR::CameraCalibration&)cameraCalibration andPose:(QCAR::Matrix34F)pose withOffset:(CGPoint)offset[/CODE] I bel

Hi everyone. I'm trying to get the tip of MoSR work in the version of QCAR that I'm using, wich is 1.5.3 beta1. Maybe someone can help me and update the technique to the last version. Some things I solved, like the projectionMatrix, wich in the new version is in the qUtils. But I can't find the:

You can now access the camera calibration like this (note you no longer need the Tracker): [CODE] const QCAR::CameraCalibration& cameraCalibration = QCAR::CameraDevice::getInstance().getCameraCalibration(); [/CODE] Be sure to add the following imports: [CODE] #import #import

Hi All (MoSR), I'm working with the frame markers example app at the moment, also trying to super impose just a 2d image over the frame marker(s).

Like I said, it's probably worth searching the forums, as it is amazing what you can find...

Although this link is for Android, you may be able to apply it in iOS:

https://developer.vuforia.com/resources/dev-guide/textured-plane-target

 

N

Thanks a lot for your reply. Now i am able to overlay any png image over the detected target.

 I am able to change the x and y cooridinates of the texture which is being overlayed .

Wanted to know whether can i change the size of the overlayed texture?

Can anyone guide me how to get coordinates to overlay image for the latest library? I am trying to get x, y, width and height to place image over the image target.