locked
Media capture using capture device sample (MSDN) possible issues when using backcamera and grayscale effect running on ARM tablet?

    Question

  • I am trying to base a solution off of this msdn example.  http://code.msdn.microsoft.com/windowsapps/Media-Capture-Sample-adf87622

    The examples seem to run fine, except when building for ARM and running on a Windows RT device ( Asus Vivo Tab RT ) while using the backcamera.  I verified both c++ and c# version behave the same.   I select scenario 2, then I select the Camera (back), click 'Start Device', then 'Start Preview', then check 'Grayscale Effect'.

    I tried the front camera, preview w/ Grayscale effect and it works, however, try the back camera using grayscale effect and the preview freezes.  Sometimes it will freeze immediately and sometimes you get maybe 2-3 frames rendered before it freezes. 

    Can somebody verify that this example works on the backcamera when the grayscale effect is checked on a Windows RT device built for ARM?





    Tuesday, November 13, 2012 5:19 PM

Answers

  • Hello,

    There certainly may be some performance issues with the Grey Scale sample at extremely high resolutions. The algorithm that this sample uses is not optimized for low power devices. To improve performance it is recommended that you optimize the algorithm that you need to use in your custom MFT. You may also want to look into using hardware acceleration via pixel shaders to improve the performance. Keep in mind though that at some point you will be resource restricted and may need to continue to reduce the resolution of the input in order to allow your capture topology to function as you expect.

    I hope this helps,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Thursday, November 15, 2012 1:20 AM
    Moderator

All replies

  • When I run the sample Media capture using capture device sample and enable 'GrayScale' effect on Microsoft Surface tablet, the recording does not work and the app will freeze.

    How to resolve this issue?

    Tuesday, November 13, 2012 9:13 AM
  • Same issue w/ me except mine freezes only on backcamera when running on a Windows RT device built for ARM.  The front camera works fine when grayscale effect is enabled.
    Tuesday, November 13, 2012 5:55 PM
  • Any updates from MS? And I can't do a on-line debugging for Surface, when I connect the surface to Wi-Fi and start the remote debugger, the VS2012 on host PC can't find the surface. Our IT's engineer told me that may be the connection from host PC was prevented by Surface's firewall.
    Wednesday, November 14, 2012 1:45 AM
  • Hi Jason,

    I suspect that this might be memory or bandwidth problems from the size of the camera. According to ASUS's page, your front camera is 2GB and your back camera is 8GB. I cannot reproduce this on my ARM test system with a much smaller camera. I'll see if I can find a different device and will check with our media guy about where to look for likely bottlenecks.

    --Rob

    Wednesday, November 14, 2012 3:23 AM
    Owner
  • Hi, Rob:

    Did you have check this on Microsoft Surface?

    Wednesday, November 14, 2012 9:24 AM
  • Rob, thx for your reply !

    I was thinking the same thing, last night I started to mess w/ setting the video preview resolution / size; I was able to drop the size from 1600x1200 to 640x480, which the front camera seems to default to, and it worked well; I even bumped it up to 1280x960, still worked but sluggish, 640x480 is optimal for my situation... however, I had to comment out the TransformChroma call from within the TransformImage_YUY2 method to make it not freeze;  I suspect there is memory management issues now, as video preview size is not the issue for me anymore.    


    Wednesday, November 14, 2012 6:51 PM
  • Hello,

    There certainly may be some performance issues with the Grey Scale sample at extremely high resolutions. The algorithm that this sample uses is not optimized for low power devices. To improve performance it is recommended that you optimize the algorithm that you need to use in your custom MFT. You may also want to look into using hardware acceleration via pixel shaders to improve the performance. Keep in mind though that at some point you will be resource restricted and may need to continue to reduce the resolution of the input in order to allow your capture topology to function as you expect.

    I hope this helps,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Thursday, November 15, 2012 1:20 AM
    Moderator