Community
cancel
Showing results for 
Search instead for 
Did you mean: 
zhang_e_
Beginner
33 Views

SR300 Display/Record problems

I have two questions
1. The screen display is not complete problem
But displayed image is not a complete picture, how can I automatically scaled according to my picturebox

For example, I should complete image as a blue border, but my picturebox image display range is only of only the red border

Snap12.png

It is my code

private void button3_Click(object sender, EventArgs e)
        {
            PXCMSession session =
            PXCMSession.CreateInstance();
            PXCMSession.ImplVersion version =
                               session.QueryVersion();
            textBox1.Text = version.major.ToString() + "."
                               + version.minor.ToString();
            PXCMSenseManager sm =
                             session.CreateSenseManager();
            sm.EnableStream(
                 PXCMCapture.StreamType.STREAM_TYPE_COLOR,
                 0, 0);
            sm.Init();
            pxcmStatus status = sm.AcquireFrame(true);
            PXCMCapture.Sample sample = sm.QuerySample();
            PXCMImage image = sample.color;
            PXCMImage dimage = sample.depth;

            PXCMImage.ImageData data;
            image.AcquireAccess(
                 PXCMImage.Access.ACCESS_READ,
                 PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32,
                 out data);
            Bitmap bm = data.ToBitmap(0,
                                      image.info.width,
                                      image.info.height);
            pictureBox1.Image = bm;

            sm.ReleaseFrame();
            sm.Close();
            session.Dispose();
        }

2. How to record images

0 Kudos
0 Replies
Reply