"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
QCAR::Image to UIImage?
By OdedWel
on Wed, 06/20/2012 - 17:06
Can anyone give me some pointers about creating a UIImage from QCAR::Image?
Thanks,
Fastas
You'll want to start by registering for RGB888 images:
[CODE]
QCAR::setFrameFormat(QCAR::RGB888, true);
[/CODE]
Then, in renderFrameQCAR (EAGLView.mm) you can get the QCAR image:
[CODE]
QCAR::Frame frame = state.getFrame();
for (int i = 0; i < frame.getNumImages(); i++)
{
const QCAR::Image *q
[QUOTE=marchinram" />Can we not just use glReadPixels?[/QUOTE" />
It depends on what you are trying to do - if you look back, OdelWel asked how to create "a UIImage from QCAR::Image".
If you are allowing the rendering of the image to your EAGLView then you can alternatively use glReadPixels and ch
I have used the above screen capturing code in my app,but app is crashing at the line-
QCAR::setFrameFormat(QCAR::RGB888, true);
can anyone give me the reason?
It could be to do with when you are calling it. Can you let us know where you've put that call, and also put an NSLog("Setting frame format") trace by it and send us the debug log when it crashes, so we can see where in the lifecycle of QCAR it is called?
This has been extremely helpful, but on an iPhone 6 all we are getting is a series of grayscale frames of decreasing sizes and one YUV frame, which we can't decode. Is there a way to provoke the phone into giving us a full colour image in a usable colour space?
Re: QCAR::Image to UIImage?
QCAR::Image to UIImage?
It should be noted that your code will crash if the
qcarImage->getPixels()
pointer becomes invalid.Re: QCAR::Image to UIImage?
Re: QCAR::Image to UIImage?
Re: QCAR::Image to UIImage?
Re: QCAR::Image to UIImage?
Re: QCAR::Image to UIImage?
QCAR::Image to UIImage?
Hi Moderator,
I got UiImage through Your code ,
But the Problem is that I am not gettion 3D object in it .
QCAR::Image to UIImage?
Hi abhishekkatare
This is to be expected, as this code is purely to get the video frame, not the augmentation.
Typically it is used as a method for integrating with another engine, which may need the video frame to use as a backdrop.
QCAR::Image to UIImage?
Hey,
I'm using exactly the same code.
Only issue is that i'm trying to use the UIImage in UIImageView i get weird crash
it's something about __vConvert_RGB888toBGRA8888
I will try to be more specific
QCAR::Image to UIImage?
This has been extremely helpful, but on an iPhone 6 all we are getting is a series of grayscale frames of decreasing sizes and one YUV frame, which we can't decode. Is there a way to provoke the phone into giving us a full colour image in a usable colour space?