I'm assuming dark subtraction and other things happen between these two events?
Search found 14 matches
- Tue Sep 25, 2018 10:05 pm
- Forum: Scripting
- Topic: Custom frame transform?
- Replies: 15
- Views: 7436
- Tue Sep 25, 2018 9:54 pm
- Forum: Scripting
- Topic: Custom frame transform?
- Replies: 15
- Views: 7436
Re: Custom frame transform?
Thanks!
I've instrumented the C++ and return the execution time to Python - approximately 160ms per frame (1280x960 MONO8).
I've instrumented the C++ and return the execution time to Python - approximately 160ms per frame (1280x960 MONO8).
- Tue Sep 25, 2018 8:34 pm
- Forum: Scripting
- Topic: Custom frame transform?
- Replies: 15
- Views: 7436
Re: Custom frame transform?
I added a button to the toolbar to open a dialog and allow me to vary the parameters to the C++ routine. Currently only MONO8, but I'll see about MONO16 and perhaps RGB. The approach you suggested certainly works. I don't know to what extent ADPB suits astro images, but I've something to play with n...
- Tue Sep 25, 2018 11:22 am
- Forum: Scripting
- Topic: Custom frame transform?
- Replies: 15
- Views: 7436
Re: Custom frame transform?
Got something working now from Python->C++... it's not fast, but yet to work out why. [Edit - it was a debug build - release is somewhat faster] dll=ctypes.CDLL(dllfile) def handler( sender, eventArgs): frame = eventArgs.Frame info = frame.Info bufsize = int(frame.BufferSize) lease = frame.GetBuffer...
- Tue Sep 25, 2018 9:39 am
- Forum: Scripting
- Topic: Custom frame transform?
- Replies: 15
- Views: 7436
Re: Custom frame transform?
No, not yet.
- Tue Sep 25, 2018 8:03 am
- Forum: Scripting
- Topic: Custom frame transform?
- Replies: 15
- Views: 7436
Re: Custom frame transform?
This works for me... def handler( sender, eventArgs): frame = eventArgs.Frame; bufsize = int(frame.BufferSize) lease = frame.GetBufferLease() frameData_addr = lease.Buffer.ToInt64() frameData_BUF = (ctypes.c_char * bufsize).from_address(frameData_addr) # ... modify frameData_BUF[N] lease.Dispose() P...
- Mon Sep 24, 2018 10:09 am
- Forum: Scripting
- Topic: Custom frame transform?
- Replies: 15
- Views: 7436
Re: Custom frame transform?
I'm uncertain how to interact with the <System.Reflection.Pointer> object that I get from lease.Buffer.ToPointer(). dir(frameData) give me the following: ['Box', 'Equals', 'GetHashCode', 'GetObjectData', 'GetType', 'MemberwiseClone', 'ReferenceEquals', 'ToString', 'Unbox', '__class__', '__delattr__'...
- Mon Sep 24, 2018 7:21 am
- Forum: Scripting
- Topic: Custom frame transform?
- Replies: 15
- Views: 7436
Re: Custom frame transform?
Thanks, Robin. Yes, calling out to native code was a thought. Hooking the event works, I'll try accessing and modifying the frame data. >>> def handler(sender, args): ... print "got frame"; ... >>> SharpCap.SelectedCamera.FrameCaptured += handler; >>> got frame got frame got frame I did g...
- Sun Sep 23, 2018 10:43 pm
- Forum: Scripting
- Topic: Custom frame transform?
- Replies: 15
- Views: 7436
Re: Custom frame transform?
Conveniently, ADPB maintains spatial resolution - there is no change in image size, just pixel values.
https://stargazerslounge.com/topic/3022 ... l-binning/
I'd be interested to see what's possible in SharpCap. It may be scripted performance that prevents it.
- Sun Sep 23, 2018 10:40 am
- Forum: Scripting
- Topic: Custom frame transform?
- Replies: 15
- Views: 7436
Custom frame transform?
I have implemented Adaptive Digital Pixel Binning in C++ and wondered whether I am able to port to Python and have SharpCap apply to the previewed image?