brightness

Correct image for local dark / light spots, equalise luminance / intensity (local in location, not by dark/medium/light areas)

送分小仙女□ 提交于 2019-12-07 18:20:02
问题 So I have an image that has some dark spots, and they look pretty simple so I think I can creaat an luminance map, invert it and then apply it to my image to undo the dark spots. However all I can find is two methods for equalizing: equalize whole image(with histogram) or segment the image in dark meddium and light parts and equalize which you want. The first approach does not help my problem and the second approach also makes the dark objects in the image lighter. I am sure there is an easy

Change adaptive brightness level programmatically

允我心安 提交于 2019-12-07 16:22:24
How can I change the adaptive brightness level programmatically, on Android Lollipop? I know how to change the manual brightness level , and to toggle on or off the adaptive brightness . It is done like that: Settings.System.putInt(cr, Settings.System.SCREEN_BRIGHTNESS, newLevel); However, with adaptive brightness is enabled, the OS combines it with another brightness level which is different than the manual one. Is there a way to do this? Target/min/max SDK is 21. Don't know why but there is a hidden constant SCREEN_AUTO_BRIGHTNESS_ADJ in Android API to adjust adaptive brightness. But you can

iOS 7 auto brightness is overruling apps screen brightness setting

徘徊边缘 提交于 2019-12-07 10:10:45
问题 I have an iOS 7 app where I want to make the screen darker. I am adjusting the screen brightness using the following line: [UIScreen mainScreen].brightness = 0.3; This dims the screen as I expect, but if a user has auto brightness enabled the screen sometimes goes back to its original setting. Is there a way to disable auto brightness while in my app, or do I need to subscribe to the UIScreenBrightnessDidChangeNotification notification and just reset the brightness each time it is raised? 回答1

turn the screen on/off in Android with a shake

青春壹個敷衍的年華 提交于 2019-12-06 07:41:53
I'm making an app that needs to toggle the screen on/off when the user shakes the phone. So far, I've got a SensorEventListener that listens to the shakes as suggested in the answer to this question . When I detect a shake, I change the value of the screen's brightness as suggested in this question's answer . It all works great if I don't actually turn the screen off... if I set the brightness to 0.01f through the public void setBright(float value) method it works perfectly. However, if I set the brightness to 0.0f, the phone won't turn the screen again... not until I press the power button,

Default CSS filter values for brightness and contrast [duplicate]

本秂侑毒 提交于 2019-12-06 02:21:58
问题 This question already has answers here : How to Decrease Image Brightness in CSS (11 answers) Closed 5 years ago . Recently I've updated Chrome to v.26 and pictures which were displayed using HTML5 canvas were not visible anymore. As I found I had to change to brightness and contrast. How are the values for BC for CSS filters different depending on the browser engine? Default: Brightness: 0; contrast 100: Firefox ? Brightness:100; contrast:100: Chrome ? As I found out it is actually a bug fix

iOS 7 auto brightness is overruling apps screen brightness setting

落爺英雄遲暮 提交于 2019-12-05 18:33:41
I have an iOS 7 app where I want to make the screen darker. I am adjusting the screen brightness using the following line: [UIScreen mainScreen].brightness = 0.3; This dims the screen as I expect, but if a user has auto brightness enabled the screen sometimes goes back to its original setting. Is there a way to disable auto brightness while in my app, or do I need to subscribe to the UIScreenBrightnessDidChangeNotification notification and just reset the brightness each time it is raised? Legoless You cannot disable the auto brightness at all, so you will have to subscribe to the notification.

Clean way to implement gradual fading of brightness in Android?

人走茶凉 提交于 2019-12-05 16:42:56
问题 At the moment I have code to fade brightness adjustments which looks something like this: new Thread() { public void run() { for (int i = initial; i < target; i++) { final int bright = i; handle.post(new Runnable() { public void run() { float currentBright = bright / 100f; window.getAttributes().screenBrightness = currentBright; window.setAttributes(window.getAttributes()); }); } try { sleep(step); } catch (InterruptedException e) { e.printStackTrace(); } } } }.start(); I'm not sure if that's

Automatically adjusting brightness of image with OpenCV

天涯浪子 提交于 2019-12-05 10:19:56
I want to adjust the brightness of an image to a certain value in OpenCV. For example, consider this image: I calculate the brightness with: import cv2 img = cv2.imread(filepath) cols, rows = img.shape brightness = numpy.sum(img) / (255 * cols * rows) and I get an average brightness of 35%. To bring it to 66%, for example, I do: minimum_brightness = 0.66 alpha = brightness / minimum_brightness bright_img = cv2.convertScaleAbs(img, alpha = alpha, beta = 255 * (1 - alpha)) and I get an image that seems to have a 50% transparency veil: I can avoid this effect by using bias only: bright_img = cv2

让Ubuntu 14.04“保存”屏幕亮度值

天涯浪子 提交于 2019-12-05 00:54:21
首先查看一下你的屏幕亮度值的范围: sudo cat /sys/class/backlight/acpi_video0/max_brightness 到了ubuntu14.10后,路径就变为了 /sys/class/backlight/intel_backlight/max_brightness.但改不改都没什么所谓了,因为14.10中 可以手动的调节光亮度,并且系统自动保存。再次启动系统的时候已经不需要再手动改了咯!ubuntu终于修改了这一设定了。 我的是15,也就是说亮度值可以在 0 ~ 15之间。 修改 /etc/rc.local ,在最后的 exit 0 之前添加: echo 3 > /sys/class/backlight/acpi_video0/brightness 系统完成启动最后会执行这个脚本,因此每次开机,都会把亮度值设置成3。 来源: oschina 链接: https://my.oschina.net/u/2289158/blog/479439

Luminance Matching Two Colors

人盡茶涼 提交于 2019-12-04 13:05:22
This will likely seem like a very easy thing I'm trying to do but Google search has not turned up exactly what I'm looking for and I'd like to do this correctly. Essentially I need to luminance match two bmps. They are simple circles (125x125 pixels) and their original color is only know to me by their (0-255 ranged) RGB value of 255,0,0. I need to find an RGB value of gray that is the same luminance of these circles. All other luminance/brightness matching tutorials I have seen have been for pictures that have included, a variety of hues, brightnesses, etc. and I am not sure if those