ethanol100 wrote:Works nicely! You can even use it with "-a 13". I.e., raspistill -a "Somewhere\n" -a 13. We are limited to 4 lines(3x'\n')?
Yes, max 4 lines. If you do much more then you're obliterating half your image.
- The test if the -a "string" is a number does not work as expected, i.e. if I want to write -a "1. Camera" will not display anything.
- The "Annotate bitmask" needs some documentation, at the moment I guess you would need to look into the source to find its definition. I think many new user will have some problems.
- Setting colours as 0xVUY in hex is quite difficult. And got me really confused and you could mention in the help text, that you need to put the number in the format 0xFFEEDD. Not everyone knows how to write hex.
But everything seems to work as expected. Sometimes a border has not the right Y value( due to chroma sub-sampling?).
1 - blame Jamesh as he wrote that code
You're right though that it isn't the best. Probably better to separate it into 2 parameters.
2 - again, Jamesh's handiwork.
3 - As they underlying layers are using YUV, I don't want to change the MMAL API to have to do the conversion. It could be added into userland fairly easily if someone had the desire (I don't!)
4 - the background border? It should be uniform, but you do get some weird anomalies sometimes. There are options for where the chroma should be located within the 4 pixels that it is subsampled to. Most assume central, but you can have a number of locations which should all do subtly different things. I will have a quick look to make sure I'm not starting the background box on an odd pixel, as that certainly is a bad idea with subsampling.
To calculate VUY values from RGB I have written a small script "RGB2VUY.sh":
Cool, and thank you again.
6by9 wrote:Adding ! to the string is a little tricky at the moment, so it might still be worth adding handling for \xXX. It's too late to think about that now though.
I'm not exactly sure, what you mean by a little tricky. Do you mean the replacement by bash? We can put the string in single quotes '!Help!' should work without interfering with bash, like one usual do for "$" or "\\".
I'd tried -a "Wibble!\nGibber"
and got an error from bash of mismatched something or other. Doing -a "Wibble\!\nGibber" inserts both characters into the final string.
Also trying to insert a double quote becomes entertaining and needs escaping so bash does the right thing.
We could go on forever, but it probably isn't worth the effort, and I'm not a bash expert for escape sequences. Having to insert escape sequences in the first place is beyond many users.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.