Fix of the Rovio brightness control!!!!

54 posts / 0 new
Last post
Gandalf
Gandalf's picture
Fix of the Rovio brightness control!!!!

I think I have figured out the issue of Rovio camera brightness control and have a fix. I achieved this by digging into the source code just released, and diassemble and compare to the BIN file. After the fix, you will find the brightness control will have more remarkable effection than before. IE, when you set the brightness to highest, the brightness is much brighter than before!!!

Seems that the camera contrast is still not enough. I will try to see if any other hack improvement can be found.

Instructions (only work for Firmware v5.03....)

Invoke the following URLs one by one, then re-adjust your Rovio brightness. (replace ... with the right address)

http://.../debug.cgi?action=write_mem&address=0x0009fb9c&value=0x03a0107f
http://.../debug.cgi?action=write_mem&address=0x0009fb9d&value=0x0ae3a010
http://.../debug.cgi?action=write_mem&address=0x0009fba4&value=0x03a010af
http://.../debug.cgi?action=write_mem&address=0x0009fba5&value=0x08e3a010
http://.../debug.cgi?action=write_mem&address=0x0009fbac&value=0x03a010cf
http://.../debug.cgi?action=write_mem&address=0x0009fbad&value=0x06e3a010
http://.../debug.cgi?action=write_mem&address=0x0009fbb4&value=0x03a01000
http://.../debug.cgi?action=write_mem&address=0x0009fbb5&value=0x04e3a010
http://.../debug.cgi?action=write_mem&address=0x0009fbbc&value=0x03a01025
http://.../debug.cgi?action=write_mem&address=0x0009fbbd&value=0x02e3a010
http://.../debug.cgi?action=write_mem&address=0x0009fbc4&value=0x03a0104a
http://.../debug.cgi?action=write_mem&address=0x0009fbc5&value=0x00e3a010
http://.../debug.cgi?action=write_mem&address=0x0009fbcc&value=0x03a0107f
http://.../debug.cgi?action=write_mem&address=0x0009fbcd&value=0x55e3a010

 

=================

Some update on the solution:

Figured out by Chris75, another more simple command can be used instead.

IE, to set the brightness, use URL like

http://..../debug.cgi?action=write_i2c&address=0x55&value=0xnn

where  nn is a hex value from 0x00 ~ 0xff.

The trend of the value is

0xff (darkness)  ->  0x80 ,  0x00 (middle brightness)  -> 0x7f (brightest)

To set the contrast, use URL like

http://.../debug.cgi?action=write_i2c&address=0x56&value=0xnn

where nn is a hex value from 0x00~0xff.   0x00 is with the least contrast, while 0xff is with the most contrast.

[Thanks Chris75 for figouring out the write_i2c debug fucntion.]

Two other useful options to get better poor-light performance:

a) Minimum frame rate during night mode. When the light is low, the night mode will automatically reduce the frame rate by multi-sampling. The more the frame rate is reduced, the more brightness it will get.

address: 0x3b. 

Bits 7: 0 - disable night mode. 1- enable night mode (default for Rovio)

Bits 6~5

00 (default for Rovio): same as normal rate (means no use of night mode at all!)

01: 1/2 of normal mode frame rate

10: 1/4 of normal mode frame rate

11: 1/8 of normal mode frame rate

It needs to disable then reenable night mode to make it effective, so two commands are requird:

http://.../debug.cgi?action=write_i2c&address=0x3b&value=0x02

http://.../debug.cgi?action=write_i2c&address=0x3b&value=0xe2 (or, 82,a2,c2,e2)

b) The Auto Gain Control has a ceiling option, from 1x to 128x. Default is just 2x, in darkness it is not enough.  When using higher AGC ceiling, the brightness will be improved while in extra darkness, however the noise of the image will increase as well. Compared to option a, the pros is that it does not reduce framerate.

Address: 0x14

bit 6-4: 000, 2x; 001, 4x;....;110:128x

SO use the command:

http://.../debug.cgi?action=write_i2c&address=0x14&value=0xn8

where n = 0,1,2,....,6

Please see http://www.robocommunity.com/download/17526/RovioBrighter/ for a stand-alone web page called RovioBrighter for setting the brightness/contrast quickly, no matter what client software you are using.

Once this is incorporated in the Rovio client software, you can dump the RovioBrighter as you will. ^  ^

Gandalf

Gandalf
Gandalf's picture
The piece of code is in

The piece of code is in dsplib.c:

void dspSetBrightnessContrast_ov7670 (int nContrast, int nBrightness, int nAdjMode)
{
/* Contrast not set */
switch (nBrightness)
{
case 0:
i2cWriteI2C (0x55, 0xFF);
break;
case 1:
i2cWriteI2C (0x55, 0xE9);
break;
case 2:
i2cWriteI2C (0x55, 0xD4);
break;
case 3:
i2cWriteI2C (0x55, 0xBF);
break;
case 4:
i2cWriteI2C (0x55, 0xAA);
break;
case 5:
i2cWriteI2C (0x55, 0x95);
break;
case 6:
i2cWriteI2C (0x55, 0x80);
break;
default:
;
}
}

By looking into the datasheet of OV7670 (the camera CMOS chip), the range of the brightness should be around 00~FF. Someone told me that it translates to signed byte, ie, -128~127. So I conclude that the original code does not set the brightness to even beyond zero.

If my finding is right, I am so confused why this was not figured out by Woewee team.

Gandalf
Gandalf's picture
To set the contrast, I can

To set the contrast, I can hack the number 0x55 to 0x56, then the brightness control API would turn to be the contrast control instead.

Will post a web HTML file for it to be easier to be done some time.

FreddyA
FreddyA's picture
Hello Gandalf, Great job in

Hello Gandalf, Great job in discovering this birghtness and contrast control, I'll be looking forward to th HTML file.
What else have you found!?

Freddy

Gandalf
Gandalf's picture
I did not have chance to find

I did not have chance to find other things, yet. Because the camera brightness is the bitter for me, and I did compare the Rovio with normal PC cam and even mobile cam, so I believe the performance should not be that worse.

Freddy, did you try the hack and does it work fine?

FreddyA
FreddyA's picture
I havent tried it, I was

I havent tried it, I was going to wait for the HTML file you mentioned above. I will try it out but first calarify for me this; should I connect to rovio webpage an then begin pasting one by one the url and should I use the port number too in the ip address?

Andreas
Andreas's picture
Hello Gandalf

Hello Gandalf

Very good work! I was waiting for a solution like this to gain the camera picture brightness directly by the source. With this mod it's first time possible to see more details in darker rooms. This night I added the new version 1.2 of RovioDirect with a new "hacks & mods" section in the config file. Your commands are good to combine with this new feature.

To turn up the brightness by your way in RovioDirect, do the follow:
- use the new version 1.2
- open the configuration file of RovioDirect
- replace or add the following code in the "hacks & mods" section:

RobotBeforeInitCommand=ChangeResolution.cgi?ResType=0
RobotBeforeInitCommand=ChangeBrightness.cgi?Brightness=0
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fb9c&value=0x03a0107f
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fb9d&value=0x0ae3a010
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fba4&value=0x03a010af
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fba5&value=0x08e3a010
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fbac&value=0x03a010cf
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fbad&value=0x06e3a010
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fbb4&value=0x03a01000
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fbb5&value=0x04e3a010
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fbbc&value=0x03a01025
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fbbd&value=0x02e3a010
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fbc4&value=0x03a0104a
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fbc5&value=0x00e3a010
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fbcc&value=0x03a0107f
RobotBeforeInitCommand=debug.cgi?action=write_mem&address=0x0009fbcd&value=0x55e3a010
RobotAfterInitCommand=ChangeBrightness.cgi?Brightness=6 'new brightness value (1-6)

- (re)start RovioDirect and see the new much brighter pictures
- if its to bright, modify the last line to ...Brightness=4… and restart RovioDirect again

Hope it's usefull.

Kind regards

Gandalf
Gandalf's picture
Andreas said: Hello Gandalf

Andreas said: Hello Gandalf Very good work! I was waiting for a solution like this to gain the camera picture brightness directly by the source. With this mod it's first time possible to see more details in darker rooms. This night I added the new version 1.2 of RovioDirect with a new "hacks & mods" section in the config file. Your commands are good to combine with this new feature. To turn up the brightness by your way in RovioDirect, do the follow: - use the new version 1.2 - open the configuration file of RovioDirect - replace or add the following code in the "hacks & mods" section: RobotBeforeInitCommand=ChangeResolution.cgi?ResType=0 ........RobotAfterInitCommand=ChangeBrightness.cgi?Brightness=6 'new brightness value (1-6) - (re)start RovioDirect and see the new much brighter pictures - if its to bright, modify the last line to ...Brightness=4… and restart RovioDirect again Hope it's usefull. Kind regards

Hei,

Glad to see that my finding and fix also works for you and others. Excellent!  Please feel free to incorporate to any client software if you like.

However I found I thought it wrong about the brightness value when it is over 0x80. The right trend of the value should be:

0xff - most darkness.    0x80 , or 0x00 - medium       0x7f   - most brightness

My previous commands are also a little bit redundant. I will optimize them and let you know.

Another thing is, I have figure out the way to set the contrast as well. I will post it later.

I still work on a HTML file that can open locally and make the change. Then the control can be used by all but not limited to any client software.

Gandalf
Gandalf's picture
FreddyA said: I havent tried

FreddyA said: I havent tried it, I was going to wait for the HTML file you mentioned above. I will try it out but first calarify for me this; should I connect to rovio webpage an then begin pasting one by one the url and should I use the port number too in the ip address?

You may or may not connect to Rovio webpage first, I think.  You can directly input the URLs above, and the first URL may prompt you for the user name and password. You can then use other client software or the original web to adjust the brightness to see the effection.

Gandalf
Gandalf's picture
I have released the first

I have released the first version of HTML file to do the hack of brightness/contrast control.

Please see
http://www.robocommunity.com/download/17526/RovioBrighter

Enjoy it and don't hesitate to let me know your comment.

chris75
chris75's picture
Gandalf,

Gandalf,
this is just excellent! and probably first Rovio FW evolution based on release sources.
In case anyone needs it, i used this shell script to apply change to mine:

#!/bin/sh
# Use your settings for IP / Login / PWd
USER=admin
PASSWD=password
IP=192.168.0.1

POKES="0x0009fb9c&value=0x03a0107f 0x0009fb9d&value=0x0ae3a010 \
0x0009fba4&value=0x03a010af 0x0009fba5&value=0x08e3a010 \
0x0009fbac&value=0x03a010cf 0x0009fbad&value=0x06e3a010 \
0x0009fbb4&value=0x03a01000 0x0009fbb5&value=0x04e3a010 \
0x0009fbbc&value=0x03a01025 0x0009fbbd&value=0x02e3a010 \
0x0009fbc4&value=0x03a0104a 0x0009fbc5&value=0x00e3a010 \
0x0009fbcc&value=0x03a0107f 0x0009fbcd&value=0x55e3a010 "

echo "Going to poke with : " $POKES

for i in $POKES; do wget --user $USER --password $PASSWD "http://$IP/debug.cgi?action=write_mem&address=$i" ;done
wget --user $USER --password $PASSWD "http://$IP/ChangeBrightness.cgi?Brightness=6"

DaveL
DaveL's picture
Gandalf said:

Gandalf said:
I have released the first version of HTML file to do the hack of brightness/contrast control.
Please see
http://www.robocommunity.com/download/17526/RovioBrighter
Enjoy it and don't hesitate to let me know your comment.

Thanks for doing this, Gandalf! Unfortunately, I get an "access denied" error with this link.

Gandalf
Gandalf's picture
DaveL said:

DaveL said:

Gandalf said: I have released the first version of HTML file to do the hack of brightness/contrast control. Please see http://www.robocommunity.com/download/17526/RovioBrighter Enjoy it and don't hesitate to let me know your comment.

Thanks for doing this, Gandalf! Unfortunately, I get an "access denied" error with this link.

Oh I am not sure what happened.  I just submitted the new download, and I can get to it from the direct link. However, I do notice that the thing I submitted does not show up in the list of Downloads at all.

I have sent out a mail to administrator to ask.

Gandalf
Gandalf's picture
chris75 said: Gandalf, this

chris75 said: Gandalf, this is just excellent! and probably first Rovio FW evolution based on release sources. In case anyone needs it, i used this shell script to apply change to mine: #!/bin/sh # Use your settings for IP / Login / PWd USER=admin PASSWD=password IP=192.168.0.1 POKES="0x0009fb9c&value=0x03a0107f 0x0009fb9d&value=0x0ae3a010 \ 0x0009fba4&value=0x03a010af 0x0009fba5&value=0x08e3a010 \ 0x0009fbac&value=0x03a010cf 0x0009fbad&value=0x06e3a010 \ 0x0009fbb4&value=0x03a01000 0x0009fbb5&value=0x04e3a010 \ 0x0009fbbc&value=0x03a01025 0x0009fbbd&value=0x02e3a010 \ 0x0009fbc4&value=0x03a0104a 0x0009fbc5&value=0x00e3a010 \ 0x0009fbcc&value=0x03a0107f 0x0009fbcd&value=0x55e3a010 " echo "Going to poke with : " $POKES for i in $POKES; do wget --user $USER --password $PASSWD "http://$IP/debug.cgi?action=write_mem&address=$i" ;done wget --user $USER --password $PASSWD "http://$IP/ChangeBrightness.cgi?Brightness=6"

This is great.  Maybe I will just release the tech detail of the hack and finding, so that you guys can use the finding in different way freely.

Gandalf
Gandalf's picture
Gandalf said:

Gandalf said:

DaveL said:

Gandalf said: I have released the first version of HTML file to do the hack of brightness/contrast control. Please see http://www.robocommunity.com/download/17526/RovioBrighter Enjoy it and don't hesitate to let me know your comment.

Thanks for doing this, Gandalf! Unfortunately, I get an "access denied" error with this link.

Oh I am not sure what happened.  I just submitted the new download, and I can get to it from the direct link. However, I do notice that the thing I submitted does not show up in the list of Downloads at all. I have sent out a mail to administrator to ask.

Yes it is now fixed as the administrator (Peter) has helped me to post it so that everybody can see and download now.

DaveL
DaveL's picture
Works perfectly! Thanks!

Works perfectly! Thanks!

zinkoxyde
zinkoxyde's picture
Before and after pics?

Before and after pics?

Gandalf
Gandalf's picture
zinkoxyde said: Before and

zinkoxyde said: Before and after pics?

I put some before and after pics in the Galary of the download.

You can directly find it in

http://www.robocommunity.com/gallery/17527/Gallery-RovioBrighter/

cagedbat
cagedbat's picture
i note this fix (which i

i note this fix (which i tried and was great) is stated as for 5.03 firmware only..I've just downgraded back to 5.00 as the external IP was giving me grief and the video went super slow in 5.03, is there any harm in trying your fix on the earler firmware?

Bat

MassiveOverkill
MassiveOverkill's picture
Great work. I'm using 37 for

Great work. I'm using 37 for brightness and 78 for contrast. Picture is close to realtime. I used this to convert hex to decimal: http://easycalculation.com/hex-converter.php

That would be the only thing I would add is a built-in hexidecimal to binary converter.

Thanks Gandalf, this and the new RovioDirect really improve the quality of the Rovio experience.

Gandalf
Gandalf's picture
Thanks for your support

Thanks for your support everybody.

I am now releasing the tech detail of the finding, so that any other developer can use this finding to include in your software.

(1) Change the absolute brightness/contrast value for different logical level.

The absolute brightness/contrast value to be programmed to the camera chip is stored corresponding to the logical level 0~6. Use the write_mem command to alter the long word of the following addresses to 0x10##ea00 (change "##" to the byte in hex for the required brightness/contrast value).

Level 0: 0x0009fb9a
Level 1: 0x0009fba2
Level 2: 0x0009fbaa
Level 3: 0x0009fbb2
Level 4: 0x0009fbba
Level 5: 0x0009fbc2
Level 6: 0x0009fbca

The range of "##" is from 00 ~ FF.

For brightness, FF is the lowest brightness, 80 & 00 is the medium point, and 7F is the highest brightness.
For contrast, 00 is the lowest contrast while FF is the highest contrast.

(2) To change the brightness to logical level 0 ~ 6

Following API can be used according to API manual:
ChangeBrightness.cgi?Brightness=N (change N to 0 ~ 6)

However if the new API invoke has the same brightness level with previous API, seems that the later one is just ignored even if the absolute value has changed.

(3) To change the contrast to logical level 0 ~ 6

There is no existing API for the contrast. However, after the following change, the brightness API can be used to set the contrast as well using the absolute value stored for level 0 ~ 6. Changing it back can restore the function of brightness API

To change contrast, write address 0x0009fbce with value 0x0056e3a0
To change brightness, wirte address 0x0009fbce with value 0x0055e3a0

The addresses are for firmware 5.03. For other firmware version, I need some time to find out the right address later.

There are several options to make the changes for your client software.

Option 1: Change the absolute value of brightness and contrast to any value, like what I did in the RovioBrighter now.

Option 2: When start-up, modify the contrast to a certain pre-defined value, and update the absolute value table for level 0 ~ 6 so that it can cover the most brigtness area. Then later on, the existing API of brightenss contral can still work well with a wider range of effect. This is like what I posted here at the beginning. I may add this to RovioBrighter as well.

One small note: when using write_mem command to change a byte, actually we are changing a long word.
If the first byte of the long word starts with a~f, it always fails. I found out no work-around at this time. So at the beginning, I used two commands to change a byte. Actually that is not necessary. Now I use another address which value starts from 0~9, then it works by single command to alter a byte alone.

Hope this helps.

Gandalf

MassiveOverkill
MassiveOverkill's picture
MassiveOverkill said: Great

MassiveOverkill said: Great work. I'm using 37 for brightness and 78 for contrast. Picture is close to realtime. I used this to convert hex to decimal: http://easycalculation.com/hex-converter.php That would be the only thing I would add is a built-in hexidecimal to binary converter. Thanks Gandalf, this and the new RovioDirect really improve the quality of the Rovio experience.

Andreas, could you tell me what I would have to store in the Hacks & Mods section so that my Rovio always starts up with 37 brightness and 78 contrast (that's actually hex values)?   Thanks.

Mannyman
Mannyman's picture
MassiveOverkill said:

MassiveOverkill said:

MassiveOverkill said: Great work. I'm using 37 for brightness and 78 for contrast. Picture is close to realtime. I used this to convert hex to decimal: http://easycalculation.com/hex-converter.php That would be the only thing I would add is a built-in hexidecimal to binary converter. Thanks Gandalf, this and the new RovioDirect really improve the quality of the Rovio experience.

Andreas, could you tell me what I would have to store in the Hacks & Mods section so that my Rovio always starts up with 37 brightness and 78 contrast (that's actually hex values)?   Thanks.

LOL.

I have RovioDirect running as well as my browser with the Rovio Brightness page on. I can now change settings on the fly. I do not need to close and re-open RovioDirect to wait for the changes.

A slider gadget or at least a chart displaying the range of possible values would be helpful.

Here are the other web pages I have open as I had no clue what hexadecimal was before reading this thread. :

http://www.whathexcode.com/

http://www.ugrad.cs.ubc.ca/~cs101/2008S/notes/hexChart.jpg

Today I've settled on 5f and 7f for an unlit hallway...

 

Thanks, all of you.

RebelTaz
RebelTaz's picture
Quick question... "8. Don't

Quick question... "8. Don't change the brightness via your Rovio client again." Is this a warning as in "... if you do, something bad will happen" or a bonus as in "... you'll never have to use the Rovio client control again"? Once you use RovioBrightness how do you revert back to default if you should ever want to?

Thanks....

Andreas
Andreas's picture
MassiveOverkill said:

MassiveOverkill said:

Andreas, could you tell me what I would have to store in the Hacks & Mods section so that my Rovio always starts up with 37 brightness and 78 contrast (that's actually hex values)?   Thanks.

Hi. This should be:

RobotAfterInitCommand=debug.cgi?action=write_mem&address=0x0009fbce&value=0x0056e3a0
RobotAfterInitCommand=debug.cgi?action=write_mem&address=0x0009fb9a&value=0x1078ea00
RobotAfterInitCommand=debug.cgi?action=write_mem&address=0x0009fba2&value=0x1078ea00
RobotAfterInitCommand=ChangeBrightness.cgi?Brightness=0
RobotAfterInitCommand=ChangeBrightness.cgi?Brightness=1
RobotAfterInitCommand=debug.cgi?action=write_mem&address=0x0009fbce&value=0x0055e3a0
RobotAfterInitCommand=debug.cgi?action=write_mem&address=0x0009fb9a&value=0x1037ea00
RobotAfterInitCommand=debug.cgi?action=write_mem&address=0x0009fba2&value=0x1037ea00
RobotAfterInitCommand=ChangeBrightness.cgi?Brightness=0
RobotAfterInitCommand=ChangeBrightness.cgi?Brightness=1 

Replace and delete all older robot init commands. The green numbers are your values.

Hope it helps. 

MassiveOverkill
MassiveOverkill's picture
Perfect!! Thanks Andreas.

Perfect!! Thanks Andreas.

cowboyctx
cowboyctx's picture
Any word on how to change it

Any word on how to change it back? My Rovio does not like its new values. Too Dark or too grainy.

Gandalf
Gandalf's picture
RebelTaz said: Quick question

RebelTaz said: Quick question... "8. Don't change the brightness via your Rovio client again." Is this a warning as in "... if you do, something bad will happen" or a bonus as in "... you'll never have to use the Rovio client control again"? Once you use RovioBrightness how do you revert back to default if you should ever want to? Thanks....

If you change the brightness via your Rovio client again, either of the two cases happen:

- If you change the level to 0 or 1, it should be just the same as you just set via RovioBrighter.

- If you change the level to greater than 1, then the brightness will just use the old value of Rovio firmware (which is very dark normally).

Gandalf
Gandalf's picture
cowboyctx said: Any word on

cowboyctx said: Any word on how to change it back? My Rovio does not like its new values. Too Dark or too grainy.

A simple reset would work.  Otherwise you need to alter the brightness of level 0~6 with other values. Please refer to my previous post about the tech detail.

You may use these values to span the brightness with a more reasonable range (the previous one was not good when the average is below 3).

Level: value

--------------------

0:  0x99
1:  0x00
2:  0x19
3:  0x32
4:  0x4b
5:  0x64
6:  0x7F

robopizza
robopizza's picture
Great stuff thanks gandalf!

Great stuff thanks gandalf!

I Heart Robotics
I Heart Robotics's picture
It's crazy that it's a

It's crazy that it's a software issue.

Excellent work Gandalf.

RebelTaz
RebelTaz's picture
I tried this and I didn't

I tried this and I didn't notice any difference, but I noticed I was running v5.00 firmware. I just upgraded to v5.03 and I still do not see any difference when I click update on the set.html page. Am I doing something wrong? I am using the address as 192.168.1.180:88 BTW to account for the different port...

EDIT - I just tried roviocam.html and it worked fine, so what is set.html for?

Gandalf
Gandalf's picture
Hi RebelTaz,

Hi RebelTaz,

Good to know you have fixed it by yourself.

Roviocam.html is the HTML with frames. Because I post the URLs on another frame to make it work. Both files are required.

chris75
chris75's picture
Gandalf,

Gandalf,
just come across some (may be) hidden function to read/write i2c bus via Web.
It's in LibIPCamera.c / function 'Config_MemDebug(..)' apparently it's possible to use URLs like:
/debug.cgi?action=write_i2c&address=0x55&value=0x60
/debug.cgi?action=read_i2c&address=0x55

I confirm it changes brightness instantly, in my browser. Not an expert of this camera so you may have smarter value to pass.

There are many other hidden functions, interestingly even malloc is exposed so it may be possible to alloc mem / poke ARM code in it and get it to be executed eventually reusing some existing FW code.

While Wowee releases missing GPL pieces and things are gnu ported (it if ever happen), it may be a least effort path to FW hacking.

Gandalf
Gandalf's picture
Thansk Chris! So it will be

Thansk Chris! So it will be very quick to make the brightness/contrast change for Rovio using the new hidden function dug out by you.

I will update the RovioBrighter to use the updated URLs.

Reborn
Reborn's picture
The best hack since Rovio has

The best hack since Rovio has been launched
great job Gandalf
thanks a lot
René

Gandalf
Gandalf's picture
RovioBrighter 1.0 released!

RovioBrighter 1.0 released!

- Now it uses slidebars to change the brightness/contrast.
- The effect is immediate when the slidebar is dragged.

Rovio Brighter

Thanks Chris75 for figuring out the write_i2c command, which is much helpful!

In the next release, I may figure out some other useful camera chip setting to make the quality better.

Gandalf

DaveL
DaveL's picture
Gandalf said: RovioBrighter 1

Gandalf said: RovioBrighter 1.0 released! - Now it uses slidebars to change the brightness/contrast. - The effect is immediate when the slidebar is dragged. Rovio Brighter Thanks Chris75 for figuring out the write_i2c command, which is much helpful! In the next release, I may figure out some other useful camera chip setting to make the quality better. Gandalf

Thanks for this, Gandalf! Unfortunately though, it only works with Internet Explorer on the PC. With Firefox (PC or Mac), the sliders don't move at all. With Safari, the sliders move but nothing happens to the brightness or contrast and nothing shows up in the debug box. Note that the previous version works fine.

Mannyman
Mannyman's picture
Doesn't work on my mobile. :(

Doesn't work on my mobile. :(
Anyway to make the page webkit compatible?

WebKit-based browsers include:
Web Browser for Android (mobile device platform)
Google Chrome
Konqueror (version 4 can use WebKit as an alternative)
Safari
Web Browser for S60, used in all Nokia Symbian smartphones.
WebOS, used in the Palm Pre mobile

Gandalf
Gandalf's picture
To make javascript compatible

To make javascript compatible with different web brownser and even mobile brownswer is quite a bitter work...

I may choose a workaround solution instead. For IE uncompatible brownsers, possibly I can just put the text edit box instead of the slidebar. This is then similar to the first version - however as the new API is used, it should be still much faster than the previous one.

Mannyman
Mannyman's picture
Gandalf said: To make

Gandalf said: To make javascript compatible with different web brownser and even mobile brownswer is quite a bitter work... I may choose a workaround solution instead. For IE uncompatible brownsers, possibly I can just put the text edit box instead of the slidebar. This is then similar to the first version - however as the new API is used, it should be still much faster than the previous one.

Thank You.

Gandalf
Gandalf's picture
I have downloaded and

I have downloaded and installed Google Chrome in my XP, and I do notice that it works for Chrome.

Mannyman, what's the output for your mobile browser, and what is it specificly?

Mannyman
Mannyman's picture
It works great on Chrome in

It works great on Chrome in win xp.
I just wanted you to try using chrome.

Just kidding.

I had only tried it on my phone, and not Chrome on my PC, and read that it did not work in Safari, so I though it was webkit based browsers with the problem.

My mobile browser's touch interface does not work with the slider. My finger either drags, or zooms the whole page.

Either way, great work. I do not change the settings that often, so an occasional trip to a PC is fine with me.

Thanks again,
Manny

Gandalf
Gandalf's picture
Updated to version 1.1 with

Updated to version 1.1 with the changes:

1. Add the text fields with value 0~1, and the manual update buttons. This should work for most browsers.
2. Tested in Chrom and Safari in my PC XP, and it should now work in both.
3. Still not tested in mobile browsers. Mannyman, please help to test.
4. Not able to install Firefox in my PC, so not debugged in Firefox, yet.

Gandalf.

Mannyman
Mannyman's picture
Works on my Palm Pre like a

Works on my Palm Pre like a charm.

Will be using it in my app.

Thanks.

Gandalf
Gandalf's picture
Cool! Thanks for the using.

Cool! Thanks for the using.

All, you are encouraged to include this kind of API into your own client software (like RC II, Rovio Direct, etc).

Gandalf

Gandalf
Gandalf's picture
Released 2.0 of RovioBrighter

Released 2.0 of RovioBrighter(http://www.robocommunity.com/download/17526/RovioBrighter/) to add two camera chip control to get better performance in extra poor light:

Use combination of following two options to get better performance in extra pool light:

a) Select night mode minimum frame rate from 1x to 1/8x normal rate, so as to get better night mode performance. The frame rate would get slower, however the image brightness would be better and no much noise increases.

b) Select AGC gain ceiling from 1x to 128x, the image would be lighter without reducing frame rate, however the image noise would increase as well.

DaveL
DaveL's picture
Gandalf said: Released 2.0 of

Gandalf said: Released 2.0 of RovioBrighter(http://www.robocommunity.com/download/17526/RovioBrighter/) to add two camera chip control to get better performance in extra poor light: Use combination of following two options to get better performance in extra pool light: a) Select night mode minimum frame rate from 1x to 1/8x normal rate, so as to get better night mode performance. The frame rate would get slower, however the image brightness would be better and no much noise increases. b) Select AGC gain ceiling from 1x to 128x, the image would be lighter without reducing frame rate, however the image noise would increase as well.

Great improvement! The minimum frame rate control in particular seems to work really well. Thanks!

Interesting difference in this version. Setting the regular Rovio brightness control down to 0 no longer reverts to the RovioBrighter setting. This was useful but not a big deal.

--Dave

Gandalf
Gandalf's picture
Hi Dave,

Hi Dave,

Thanks for using and comment.

Setting the brightness control using the old client will overwrite the setting of brightness only. The other settings are not revertable.

Gandalf

chris75
chris75's picture
I compiled an updated version

I compiled an updated version of FW with a small patch to rovio.js to send brightness values via i2c so image can be brighter.

I commited patch + uploaded firmware on https://sourceforge.net/projects/rovio/
Not perfect (dirty hack) but may help in low light conditions.

Usual Rovio FW update procedure, works on My Rovio.
Update only if you are comfortable with Rovio FW update (eventually reset) procedure as i've not been able to test on someone else Rovio.

HTH
--Chris

chris75
chris75's picture
I compiled an updated version

I compiled an updated version of FW with a small patch to rovio.js to send brightness values via i2c so image can be brighter.

I commited patch + uploaded firmware on sourceforge.net/projects/rovio/
Not perfect (dirty hack) but may help in low light conditions.

Usual Rovio FW update procedure, works on My Rovio.
Update only if you are comfortable with Rovio FW update (eventually reset) procedure as i've not been able to test on someone else Rovio.

HTH
Chris

Pages