I'd like to get the histogram of my captured image so I can adjust the exposure time automatically. Is there a lib/function to do so?
I have two more questions
- I also see there is a function SharpCap.ImageProcessing.SkyCoordConverter.ConvertAltAzToRaDec, what's the params types of this and how to use it? how can I learn the param myself?
- I'm trying to import numpy but directly adding it to path seems not working.
What I did is use site.addsitedir(r'my\anaconda2\lib\site-packages')
import numpy
then it syas: ImportError, cannot import nultiarray from numpy.core
What's the correct way if I want to use numpy here?
Thanks!
get histogram of captured image
- admin
- Site Admin
- Posts: 13338
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: get histogram of captured image
Hi,
see this thread - viewtopic.php?f=14&t=1141 - for details on how to get notification of each frame being captured and in particular get the frame object itself. When you have the frame object, frame.GetStats() will give you back the mean and standard deviation of the frame pixel values. Not quite the histogram, but probably enough for a first attempt at this.
I don't think you will be able to import numpy - SharpCap uses IronPython and is only able to import pure python code, where I think numpy uses C code.
I'm not sure why you don't see more help in the UI at the moment for things like the parameters on the SkyCoordConverter - I will investigate if something has broken there.
cheers,
Robin
see this thread - viewtopic.php?f=14&t=1141 - for details on how to get notification of each frame being captured and in particular get the frame object itself. When you have the frame object, frame.GetStats() will give you back the mean and standard deviation of the frame pixel values. Not quite the histogram, but probably enough for a first attempt at this.
I don't think you will be able to import numpy - SharpCap uses IronPython and is only able to import pure python code, where I think numpy uses C code.
I'm not sure why you don't see more help in the UI at the moment for things like the parameters on the SkyCoordConverter - I will investigate if something has broken there.
cheers,
Robin
Re: get histogram of captured image
Thank you Robin, this is very useful!
Could you please also tell me the params for SkyCoordConverter?
Could you please also tell me the params for SkyCoordConverter?
- admin
- Site Admin
- Posts: 13338
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: get histogram of captured image
Hi,
actually I've fixed the bug in SharpCap that stopped the intellisense from showing the parameters - I will upload a new build later today that will let you find that info (and other functions) yourself.
cheers,
Robin
actually I've fixed the bug in SharpCap that stopped the intellisense from showing the parameters - I will upload a new build later today that will let you find that info (and other functions) yourself.
cheers,
Robin
- admin
- Site Admin
- Posts: 13338
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: get histogram of captured image
New build uploaded - you should now see parameter lists like this
To see parameters on a type constructor, enter the name of the type followed by a '.', then use the down arrow key to go down to the method '__new__' in the suggestion list and ignore the first parameter of 'cls: type'.
cheers,
Robin
To see parameters on a type constructor, enter the name of the type followed by a '.', then use the down arrow key to go down to the method '__new__' in the suggestion list and ignore the first parameter of 'cls: type'.
cheers,
Robin
Re: get histogram of captured image
wow. awesome! Thank you!