multiple cameras

1 Answer 149 Views
WebCam
Haithem
Top achievements
Rank 1
Haithem asked on 06 Jul 2022, 01:27 AM

hello

 

I have multiple cameras attached to the system and at the time , I wanted to display result of 3 cameras in small screen and 1 from these cameras in a big picture box. But When I select one of the came and take snapshots and display the result in picture box, the video start displaying in a picture box but the selected camera starts blinking. In case, if you didn't understand my problem I have attached a video and a code.


Please guide me how I can display the selected camera video feed in a picture box and it should not blink.

1 Answer, 1 is accepted

Sort by
1
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 08 Jul 2022, 09:54 AM

Hi Haithem,

It seems that the video and the code fail to attach. Can you resend them again so that I have a better look and the set-up of the cameras? Generally speaking, we are not aware of such behavior using our RadWebCam control so a video and a sample project will be of great help narrow down the reason behind this.

Regards,
Dinko
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Haithem
Top achievements
Rank 1
commented on 13 Jul 2022, 02:21 PM

thank you for your support  

this my code and video example showing what i want   

i want to display image from radwebcam  to picturebox  or another radwabcam 

Dess | Tech Support Engineer, Principal
Telerik team
commented on 14 Jul 2022, 11:43 AM

Hello, Haithem, 

The provided sample project is greatly appreciated. However, it seems different compared to the one shown in the video. 

I have reviewed the code and I can suggest you after initializing a RadWebCam and starting it, to subscribe to the RadWebCam.SnapshotTaken event. In the SnapshotTakenEventArgs you have access to the Snapshot image which can be directly assigned to the PictureBox.Image property. 
        private void simpleButton6_Click(object sender, EventArgs e)
        {
            videoFormats = RadWebCam.GetVideoFormats(this.comboBox1.SelectedItem as MediaFoundationDeviceInfo, true);
            this.radWebCam1.Initialize(this.comboBox3.SelectedItem as MediaFoundationDeviceInfo, videoFormats[0]);
            this.radWebCam1.Start();
            this.radWebCam1.SnapshotTaken += RadWebCam1_SnapshotTaken;
        }

        private void RadWebCam1_SnapshotTaken(object sender, SnapshotTakenEventArgs e)
        {
            this.pictureBox1.Image = e.Snapshot;
        }
I hope this information helps. If you need any further assistance please don't hesitate to contact me. 
Haithem
Top achievements
Rank 1
commented on 14 Jul 2022, 07:09 PM

Thanks for the reply, but I don't want to show the picture.  I want to show the video directly in picturebox at same time 

 

The attached video is an example of what I want to do

 

 

Dess | Tech Support Engineer, Principal
Telerik team
commented on 18 Jul 2022, 05:05 AM

Hi, Haithem,

Please have in mind that PictureBox is a control designed to show an Image, not a video. The possible solution that I can suggest is to use a timer on which Tick event you can force taking a snapshot from the camera and assign the produced image to the PictureBox. 

Haithem
Top achievements
Rank 1
commented on 18 Jul 2022, 09:26 AM

thank you 

can i use another RadWebCam to display video at same time

Dess | Tech Support Engineer, Principal
Telerik team
commented on 18 Jul 2022, 09:58 AM

Hi, Haithem,

One camera device can be attached only to a single RadWebCam control. You will notice that if one application is already using the camera device, the RadWebCam control can't preview the video and vice versa.

Tags
WebCam
Asked by
Haithem
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or