Comments (11)
Dear Westin,
regarding our IC Imaging Control .NET Documentation there are multiple ways to create an instance of IFrameQueueBuffer.
You can find that here:
https://www.theimagingsource.com/support/documentation/ic-imaging-control-cpp/FrameQueueBuffer.htm
The Sample you are looking for can be found here:
https://github.com/TheImagingSource/IC-Imaging-Control-Samples/blob/master/Python/Python%20NET/qt5-mediastreamsink.py
Kevin
from ic-imaging-control-samples.
Kevin,
Thanks for the information. I have been using the tisgrabber library and now I'm wondering which I should be using. Is this possible with that library?
Thanks,
Westin
from ic-imaging-control-samples.
Dear Westin,
the tisgrabber dll is based on our IC Imaging Control. So yes you can work with the tisgrabber library. I noticed that i linked the wrong sample last time, because the sample just shows how to create a FrameBuffer but the sample "Imageprocessing.py" in our Python.NET directory on github shows how to use the iframequeuebuffer:
https://github.com/TheImagingSource/IC-Imaging-Control-Samples/blob/dc84380fdb8bcd2c11503da45a13bb30b8ba4b5c/Python/Python%20NET/qt5-imageprocessing.py
from ic-imaging-control-samples.
Hi, Kevin. I was away working on other things but I now have time to work on this again. I have not seen that functionality in the tisgrabber library and I'm not super familiar with how it pulls functions out of the dll. Can you show me what the python call would look like to do that with tisgrabber?
What is the purpose of having two libraries for Python with similar functionality? Ideally my code would work under both Windows and Linux, and it seems like that may make .net a less ideal option.
Thanks
from ic-imaging-control-samples.
@TIS-Kevin , alternatively is there a way to poll and see if a new image is ready in the tisgrabber python library?
from ic-imaging-control-samples.
Hello
Polling is using "IC_SnapImage" and check, whether there is an error (no image) or success (there is a new image). Please see the sample at https://github.com/TheImagingSource/IC-Imaging-Control-Samples/blob/master/Python/tisgrabber/samples/10-save-image.py:
if ic.IC_SnapImage(hGrabber, 2000) == tis.IC_SUCCESS:
ic.IC_SaveImage(hGrabber, tis.T("test.jpg"),
tis.ImageFileTypes['JPEG'], 90)
print("Image saved.")
else:
print("No frame received in 2 seconds.")
You can use a shorter timeout than 2000 milliseconds.
Also you can find a complete tutorial at https://github.com/TheImagingSource/IC-Imaging-Control-Samples/tree/master/Python/tisgrabber in "documentation" folder.
Stefan
from ic-imaging-control-samples.
Hello Westin
Hi, do you have any Python examples showing what is in the Capturing to User-allocated Memory Buffers documentation?
I'm having a hard time figuring out a way to make a FrameQueueBuffer object.
I understand you having a hard time with that. The FrameQueueBuffer is something of IC Imaging Control .NET control, available with Python.NET. I do not know, what you want to do, but it is more simple to use the "tisgrabber" approach instead of Python.NET. They function completely different way and when I was learning Python, I thought, using .NET is more simple, than importing a DLL with ctypes. Later I learned, that ctypes is very simple and powerful. Therefore two approaches.
You may let me know, what you want to achieve, then I may can give better help.
Stefan
from ic-imaging-control-samples.
@TIS-Stefan, my goal is to implement a wrapper library for interfacing with this camera which has a function to get the latest frame from the camera without waiting for the next one. The first thing I tried was to use the IC_SnapImage image with a very low timeout but found that this doesn't work well. When I have a value here of 0 or 1, the video comes through very choppy. It isn't a consistent frame rate, but its probably getting an average of 1 or 2 new frames per second. I'm assuming frames are being dropped. The plan with this was to return the previous frame if I get an error return code from SnapImage indicating that there is no frame ready yet. Is there any reason you know of that frames would be dropped when using a small value
from ic-imaging-control-samples.
from ic-imaging-control-samples.
Hi
I wonder, for what you need a wrapper library, since the tisgrabber.py is an importer / wrapper.
However, I see now step by step, what you need to do, even if the complete image of your task is still unknown to me.
The behavior using IC_SnapImage, you see, is as expected. If you want to have every frame single, you use a callback. Please see the sample at https://github.com/TheImagingSource/IC-Imaging-Control-Samples/blob/master/Python/tisgrabber/samples/20-Callback.py
But I think, this is also not what you need, because I am guessing, without knowing, what exactly is your task. I understand, you may not want to write that in public, therefore, you can make a contact at https://www.theimagingsource.com/company/contact/.
If I know, what you want to do, I can try to provide sample code for your task.
Stefan
from ic-imaging-control-samples.
@TIS-Stefan , I'm making a wrapper because I'm supporting multiply camera types and I need a common interface. I tried the callback method you posted too and it is working for me. I remember trying that a while back and it didn't work so well. I'm not sure what I would have done wrong. Everything seems fine now. Thanks for the help.
Westin
from ic-imaging-control-samples.
Related Issues (20)
- Confusion about version of tisgrabber.dll HOT 3
- Framesnapsink/Framequesink HOT 3
- Noise Reduction HOT 18
- Taking images after external trigger for a fixed time HOT 13
- How to operate multiple cameras at the same time get image through python HOT 2
- Knowing when callback fails HOT 8
- Detailed trigger mode setting HOT 2
- Capture AVI program is not working HOT 12
- Activate/deactivate external trigger using python script HOT 4
- Exception: A set operation on a VCDProperty object failed HOT 10
- IC_StartLive fail HOT 3
- Cannot get Map Strings for Strobe Mode in python HOT 18
- Get crashed on create MediaStreamSink object in C# in .net core 7 HOT 2
- Web browser stream HOT 5
- Getting the exposure time HOT 3
- IC Imaging source upgrade to 3.5 from 3.4 HOT 1
- Ic imaging control 3.5 HOT 3
- tisfrabber LoadDeviceStateFromFile() and SnapImage HOT 1
- Python (tisgrabber): interaction with camera livestream IC_StartLive HOT 5
- Wondering if it's possible to make the video window scrollable in python HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ic-imaging-control-samples.