-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to display camera streams on WinForm? #23
Comments
For display, just put a ic4.WinForms.Display on your form, as shown in the Windows Forms example applications: https://github.com/TheImagingSource/ic4-examples/tree/master/dotnet/winforms/DialogApp-net6/DialogApp-net6 The example program also shows how to display the pre-built property dialog that allows the user to adjust settings. |
Recently i'm working on putting the camera video stream into a UI WinForm and show a cross in image, the code i modified like that:
the running result is very strange, sometimes screen likely fix the first frame and don't change, sometimes it can show the video stream, but see no cross in image. |
The display should not be used manually and as stream target at the same time. This line manually displays the modified image:
This line automatically displays all (original) images:
Don't pass the display to |
Ok, it works, and if i want to close this window through a button, how can i add this function. |
"This Window"? You mean your Windows Form? Form.Close. |
Just stop the video stream when click the button. |
To stop the video stream, call |
Where should I put this function in the above code and set relative button? |
I am very sorry, but Windows Forms programming really is outside the scope of this forum. |
Rencently i tried to compile C# program in Win32, but come across some problems like that: |
You do exactly as the error message says. ic4 is not supported in 32-bit applications. |
Hello, I want to take 4 pictures and display them in real-time on display 1, but I found that using sink TryPopOutputBuffer can only capture 3 images. Do you have any good methods?
|
When posting code, please try to create a Minimal, Reproducible Example. Your code does not show what happens after you call One wild guess: You do not dispose the Add a |
Hi,I tried method you advised before, and the modified code is:
|
You do realize that *PopOutputBuffer does not really synchronize to the camera? So you controlling some external motor depending on that function returning will not magically delay the next image being taken, and most images you receive are older than your motor movement. Additionally, are you sure that the external application is really done after 30ms? The correct way to take images at a specific time on application request is the software trigger function. |
what is software trigger function? I found https://www.theimagingsource.com/en-us/documentation/ic4dotnet/articles/grabbing-an-image.html using SnapSink.SnapSingle to grab the single image, can it meet my demand? |
There currently is no simple example showing software trigger. But a complex one: EventExposureEnd But you might get the gist of it (which is enable TriggerMode and execute TriggerSoftware, still using QueueSink). SnapSingle grab an image from the free-running stream of images, which by definition always looks a little into the past. |
Hi, I want to use two cameras to display the camera streams on different display at the same time, but now I found that I have to turn off one of the cameras for the other camera to work. How should I solve this problem?
|
Which cameras are you using? If you operate two cameras on the same network adapter or USB controllers, you have to take bandwidth into consideration. Set AcquisitionFrameRate to half the maximum for both cameras if you only have one interface. |
Two cameras both named DFM 37UX178-ML |
Please have a look at the documentation: Configuring a Video Capture Device (It does not explicitly set AcquisitionFrameRate, but you should get the idea.) |
It worked, thank you. |
The documentation describes how to access and query information about the different types of device properties. (You could also use the device property dialog in ic4-demoapp instead of IC Capture.) |
I am developing a C# UI using IC4 camera. How can I display camera stream in real-time on the WinForm? Meanwhile, how to modify parameters such as resolution and exposure time for the camera and make it change in real-time? Is there any control that can be used?
The text was updated successfully, but these errors were encountered: