camera saved frame cut off

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

camera saved frame cut off

jungle
Thanks for the help with the factory problem.  SVN fixed it.

I have a different problem.  I'm forking a thread to save camera frames every 1/24 seconds.  The program runs fine with no errors printed.  However, when I look at the saved frames, the pictures have a single black bar on the right side.

I have experimented with the xml world file declaration of the camera with the following results.

1. Setting image size to 320x240 and FOV to 60 gets rid of the bars, but I want the image size to be at least 640x480

2. Not setting image size (default seems to be 640x480) and not setting fov (i think default is 60)  results in the black bar on the right side.

3. setting only fov to 90 makes the black bar shrink a little, but it's still there.  

My camera declaration:
<model:physical name="cam1_model">
    <xyz>   0.78 4.18 5.79</xyz>
    <rpy>   0 42.00 -73.50</rpy>

    <body:empty name="cam1_body">
      <sensor:camera name="cam1_sensor">
        <imageSize>800 600</imageSize>
    <hfov>60</hfov>
        <nearClip>0.1</nearClip>
        <farClip>1000</farClip>
        <saveFrames>false</saveFrames>
        <saveFramePath>frames_trimesh</saveFramePath>
       

        <controller:generic_camera name="cam1_controller">
          <interface:camera name="camera_iface_0" />
        </controller:generic_camera>

      </sensor:camera>
    </body:empty>
  </model:physical>

setting 800x600 crashes gazebo with a failed assertion (not enough room for the image in the buffer i think).  

Also, what does baseline do?

Setting saveFrames to true produces the same results as my manual save code.  

Lastly, this seems to be a new problem since pre3.  I wonder if it is an OGRE problem, as that was upgraded too.

Thanks,
Bill
Reply | Threaded
Open this post in threaded view
|

Re: camera saved frame cut off

Nate Koenig
Hello,

Could you post an image of the error. I can't reproduce the problem.

What version of OGRE are you running?

Ignore the <baseline> tag, it's currently unused.

-nate


On Sat, Nov 29, 2008 at 8:35 PM, jungle <[hidden email]> wrote:

>
> Thanks for the help with the factory problem.  SVN fixed it.
>
> I have a different problem.  I'm forking a thread to save camera frames
> every 1/24 seconds.  The program runs fine with no errors printed.  However,
> when I look at the saved frames, the pictures have a single black bar on the
> right side.
>
> I have experimented with the xml world file declaration of the camera with
> the following results.
>
> 1. Setting image size to 320x240 and FOV to 60 gets rid of the bars, but I
> want the image size to be at least 640x480
>
> 2. Not setting image size (default seems to be 640x480) and not setting fov
> (i think default is 60)  results in the black bar on the right side.
>
> 3. setting only fov to 90 makes the black bar shrink a little, but it's
> still there.
>
> My camera declaration:
> <model:physical name="cam1_model">
>    <xyz>   0.78 4.18 5.79</xyz>
>    <rpy>   0 42.00 -73.50</rpy>
>
>    <body:empty name="cam1_body">
>      <sensor:camera name="cam1_sensor">
>        <imageSize>800 600</imageSize>
>        <hfov>60</hfov>
>        <nearClip>0.1</nearClip>
>        <farClip>1000</farClip>
>        <saveFrames>false</saveFrames>
>        <saveFramePath>frames_trimesh</saveFramePath>
>        <!--<baseline>0.2</baseline>-->
>
>        <controller:generic_camera name="cam1_controller">
>          <interface:camera name="camera_iface_0" />
>        </controller:generic_camera>
>
>      </sensor:camera>
>    </body:empty>
>  </model:physical>
>
> setting 800x600 crashes gazebo with a failed assertion (not enough room for
> the image in the buffer i think).
>
> Also, what does baseline do?
>
> Setting saveFrames to true produces the same results as my manual save code.
>
> Lastly, this seems to be a new problem since pre3.  I wonder if it is an
> OGRE problem, as that was upgraded too.
>
> Thanks,
> Bill
> --
> View this message in context: http://www.nabble.com/camera-saved-frame-cut-off-tp20754524p20754524.html
> Sent from the playerstage-gazebo mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Playerstage-gazebo mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: camera saved frame cut off

gte199t
Hello, I've seen this problem as well.   Using OGRE-1.6.1.

Before (with strip at bottom)  -- yes there are two black objects in the image with a green background.





After resizing gazebo gui window
Reply | Threaded
Open this post in threaded view
|

Re: camera saved frame cut off

Nate Koenig
I believe this problem is fixed in SVN. I had seen just a black strip
along the edge of the image.

Let me know if there is still an issue.

-nate

On Wed, Mar 4, 2009 at 9:10 PM, gte199t <[hidden email]> wrote:

>
> Hello, I've seen this problem as well.   Using OGRE-1.6.1.
>
> Before (with strip at bottom)  -- yes there are two black objects in the
> image with a green background.
> http://www.nabble.com/file/p22344951/Screenshot-PlayerCam0.png
>
>
>
>
> After resizing gazebo gui window
> http://www.nabble.com/file/p22344951/Screenshot-PlayerCam1.png
> --
> View this message in context: http://www.nabble.com/camera-saved-frame-cut-off-tp20754524p22344951.html
> Sent from the playerstage-gazebo mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Playerstage-gazebo mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: camera saved frame cut off

gte199t
I think it has been (partially) fixed in SVN (R7593).  I say partially since when gazebo is started headless (-g), the entire image is black.  Otherwise there's a flicker in the player cam that wasn't present in R7322 but the camera image is not affected in the same manner by changes in the size and position of the GUI.

gt