[Ves] Render mobile camera video using ves
Aashish Chaudhary
aashish.chaudhary at kitware.com
Thu Mar 27 09:39:58 EDT 2014
Seems like an objective C error. Do you know the exact line that's causing
the error? If you debug in Xcode what does it tell you?
- Aashish
On Wed, Mar 19, 2014 at 3:18 PM, Li Ge <lge at ucsd.edu> wrote:
> Hi Aashish,
>
> Thanks for your help. I followed your hint and try to get
> TestTexturedBackground demo running. However, I encounter the following
> issues:
>
> In the line: rep->setPolyData(polyData),
> EXC_BAD_ACCESS(code=EXC_ARM_DA_ALIGN, ...) error occurs.
>
> The loadData method is defined in a class ISEViewer:: public vesKiwiBaseApp.
> It is same as the one in TestTexturedBackground:
>
> void loadData(const std::string &filename, const std::string&imageFilename)
>
> {
>
> this->unloadData();
>
> vesKiwiDataLoader loader;
>
> vtkSmartPointer<vtkPolyData> polyData =
>
> vtkPolyData::SafeDownCast(loader.loadDataset(filename));
>
> assert(polyData.GetPointer());
>
>
>
> vesKiwiPolyDataRepresentation* rep = new vesKiwiPolyDataRepresentation
> ();
>
> rep->initializeWithShader(this->ShaderProgram);
>
>
> // Here is the EXC_BAD_ACCESS error occurs
>
> rep->setPolyData(polyData);
>
> rep->addSelfToRenderer(this->renderer());
>
> this->DataRep = rep;
>
>
>
> this->setBackgroundImage(imageFilename);
>
> }
>
>
> The method is called in a ViewController's initViewer method:
>
> -(void) initViewer
>
> {
>
> [EAGLContext setCurrentContext:self.context];
>
>
>
> std::string model = [[[NSBundle mainBundle] pathForResource:@"bunny"
> ofType:@"vtp"] UTF8String];
>
> std::string background = [[[NSBundle mainBundle] pathForResource:
> @"kiwi_opaque" ofType:@"png"] UTF8String];
>
>
>
> self->viewer = ISEViewer::Ptr(new ISEViewer);
>
> self->viewer->initGL();
>
> [self resizeView];
>
>
>
> self->viewer->initShader(
>
> vesBuiltinShaders::vesShader_vert(),
>
> vesBuiltinShaders::vesShader_frag());
>
>
> self->viewer->loadData(model, background);
>
> self->viewer->resetView();
>
> }
>
> I am not sure what cause the issue, any help is appreciated!
>
>
> On Mon, Mar 17, 2014 at 8:29 AM, Aashish Chaudhary <
> aashish.chaudhary at kitware.com> wrote:
>
>> Dear Li,
>>
>> Although the utility is not directly exposed, it can be done. There is an
>> example int the kiwi/testing to render texture as the background imagery.
>>
>> If you can get the video frame as texture then you can use the code to
>> achieve video rendering on the background. Let us know if you need help.
>>
>> - Aashish
>>
>>
>>
>> On Fri, Mar 14, 2014 at 3:15 PM, Li Ge <lge at ucsd.edu> wrote:
>>
>>> Hi all,
>>>
>>> I am trying to integrate ves with a mobile augmented reality app. I am
>>> wondering how to render camera video background using ves. Is it possible?
>>>
>>> --
>>> Li Ge
>>> Department of Structural Engineering
>>> UC San Diego
>>>
>>> _______________________________________________
>>> Ves mailing list
>>> Ves at public.kitware.com
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>>>
>>>
>>
>>
>> --
>> | Aashish Chaudhary
>> | R&D Engineer
>> | Kitware Inc.
>> | www.kitware.com
>>
>
>
>
> --
> Li Ge
> Department of Structural Engineering
> UC San Diego
>
--
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20140327/52ad1253/attachment-0003.html>
More information about the Ves
mailing list