Brightness of light caught by camera

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Chesshirecat
Posts: 1
Joined: 08 Jul 2023, 09:20

Brightness of light caught by camera

10 Jul 2023, 15:48

I've found TLM's code that reffers to getting current brightness of the screen:

Code: Select all

CurrentBrightness 	:= GetCurrentBrightNess()
GetCurrentBrightNess()
{
For property in ComObjGet( "winmgmts:\\.\root\WMI" ).ExecQuery( "SELECT * FROM WmiMonitorBrightness" )
		currentBrightness := property.CurrentBrightness	
return currentBrightness
}
[Mod edit: [code][/code] tags added.]

Is there something simmilar to get current brightness of light caught by camera ?
User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: Brightness of light caught by camera

10 Jul 2023, 16:56

Welcome to this AutoHotkey forum!

Just a few thoughts: I don't think it would be similar. The screen brightness is uniform, but a camera has a sensor that might support an individual brightness level for every pixel-- usually millions of them. Accessing such data might also require some special techniques specific to the camera device itself. You might want to search the forum to see whether others have done it.
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Brightness of light caught by camera

10 Jul 2023, 20:01

If You need to get brightness of image from camera, then You can use opencv for such a task
https://stackoverflow.com/questions/14243472/estimate-brightness-of-an-image-opencv

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: apeironn, Bing [Bot], Descolada and 213 guests