on the events,
SharpCap.CaptureEvent will get notifications of things like opening camera, starting capture, ending capture, etc
SharpCap.SelectedCamera.FrameCaptured gets notifications for each frame
you should do the -= to unsubscribe from the event for each one that you have subscribed to.
For the calculation of the maximum value, I have an internal function to calculate the histogram of an ROI of the frame that I could make available. This would work something like
Code: Select all
histogram = Frame.CalculateHistogram(rectangle)
lumArray = histogram.Values[0]
Would that do?
cheers,
Robin