User avatar
peepo
Posts: 306
Joined: Sun Oct 21, 2012 9:36 am

Grayscale option

Thu Feb 21, 2013 11:51 am

will there be an option to grayscale camera output?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27450
Joined: Sat Jul 30, 2011 7:41 pm

Re: Grayscale option

Thu Feb 21, 2013 12:11 pm

Yes.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27450
Joined: Sat Jul 30, 2011 7:41 pm

Re: Grayscale option

Thu Feb 21, 2013 12:30 pm

And in more detail, the app I'm currently working on (when I have time!) will allow the following to be specified (once I get it all working)

Resolution, JPEG quality, RAW capture, colour effects (setting UV which you can use to get B&W), imageFX (e.g. negative, posterise, denoise, watercolour), exposure mode, AWB mode, sharpness, contrast, brightness, saturation, ISO, EV, and thumbnail parameters.

These should also apply to video (not RAW) as well as still, but I haven't started the video app yet. (or got the stills app to work!).
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
peepo
Posts: 306
Joined: Sun Oct 21, 2012 9:36 am

Re: Grayscale option

Wed Apr 10, 2013 9:07 am

--colfx 128:128 should result in a monochrome image.

from https://github.com/raspberrypi/userland ... amDocs.odt

looking good...

~:"

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27450
Joined: Sat Jul 30, 2011 7:41 pm

Re: Grayscale option

Wed Apr 10, 2013 9:32 am

peepo wrote:--colfx 128:128 should result in a monochrome image.

from https://github.com/raspberrypi/userland ... amDocs.odt

looking good...

~:"
That's right - replaces the UV channels of the YUV image with the specified numbers.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Grayscale option

Wed Apr 10, 2013 10:27 am

I never understood why you'd want a camera to take monochrome. I'd take it in colour and if I wanted a monochrome 'Arty' picture I'd feed it through an image editor (trivial in most packages) to get a monochrome version, and I'd still have the colour to go back to if I wanted. If you stored it an monochrome from the outset, there isn't a colour version.......
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27450
Joined: Sat Jul 30, 2011 7:41 pm

Re: Grayscale option

Wed Apr 10, 2013 11:28 am

pluggy wrote:I never understood why you'd want a camera to take monochrome. I'd take it in colour and if I wanted a monochrome 'Arty' picture I'd feed it through an image editor (trivial in most packages) to get a monochrome version, and I'd still have the colour to go back to if I wanted. If you stored it an monochrome from the outset, there isn't a colour version.......
I'm not sure either, but I think its probably useful in certain image analysis techniques to have a greyscale image, in that you don't need to worry about the extra processing involved with colour.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27450
Joined: Sat Jul 30, 2011 7:41 pm

Re: Grayscale option

Wed Apr 10, 2013 11:49 am

It also interesting that Broadcom are constantly under pressure from customers to add ever more features like greyscale (or more esoteric stuff) etc to the ISP, and for the life of me I cannot see that they would ever be used! But you have to do what the customer wants, even if it is a rite PITA and a (seemingly) complete waste of time.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
liz
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 5212
Joined: Thu Jul 28, 2011 7:22 pm
Contact: Website

Re: Grayscale option

Wed Apr 10, 2013 11:56 am

pluggy wrote:I never understood why you'd want a camera to take monochrome. I'd take it in colour and if I wanted a monochrome 'Arty' picture I'd feed it through an image editor (trivial in most packages) to get a monochrome version, and I'd still have the colour to go back to if I wanted. If you stored it an monochrome from the outset, there isn't a colour version.......
Very much my feeling as well, but what the customer wants...

As it happens, my stills camera (a Pen from the first generation of u4/3 cameras by Olympus) also comes with "Art" options; vignetting, b/w, ultra-saturated, "film grain" (i.e. a lot of noise) etc. etc. It's all done in software on board, of course; seems a bit pointless to me when they also bundle the software so you can manipulate the images yourself on your computer *and* when the camera outputs a raw image as well as a manipulated one anyway if you're using the features in camera.
Director of Communications, Raspberry Pi

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Grayscale option

Wed Apr 10, 2013 12:34 pm

I still have a bit of B&W film in the bottom of my freezer somewhere. And a few sachets of developer & daylight tank, a film scanner, etc. taking up room somewhere else. Haven't actually shot any in maybe two years though...

Well this site is for people who like a bit of retro, surely?

On topic, the mono option will save a step if you only want to do say edge detection in your images. I suppose on consumer cameras though it's just to have "something different" - a feature that'll be played with a few times at parties, etc.

sharix
Posts: 200
Joined: Thu Feb 16, 2012 11:29 am
Location: Slovenia

Re: Grayscale option

Wed Apr 10, 2013 6:16 pm

peepo wrote:--colfx 128:128 should result in a monochrome image.

from https://github.com/raspberrypi/userland ... amDocs.odt

looking good...

~:"
I assume there is a similar trick to save only the blue channel? That would be useful for me.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27450
Joined: Sat Jul 30, 2011 7:41 pm

Re: Grayscale option

Wed Apr 10, 2013 7:35 pm

sharix wrote:
peepo wrote:--colfx 128:128 should result in a monochrome image.

from https://github.com/raspberrypi/userland ... amDocs.odt

looking good...

~:"
I assume there is a similar trick to save only the blue channel? That would be useful for me.
Remember that all the ISP runs in YUV not RGB colour space, so no concept of a blue channel.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Grayscale option

Fri May 10, 2013 8:57 am

jamesh wrote:
sharix wrote:
peepo wrote:--colfx 128:128 should result in a monochrome image.

from https://github.com/raspberrypi/userland ... amDocs.odt

looking good...

~:"
I assume there is a similar trick to save only the blue channel? That would be useful for me.
Remember that all the ISP runs in YUV not RGB colour space, so no concept of a blue channel.


Since the 'U' bit of YUV is effectively B-Y, you should be able to get B from something like Y/2 + U - 128.

sharix
Posts: 200
Joined: Thu Feb 16, 2012 11:29 am
Location: Slovenia

Re: Grayscale option

Fri May 10, 2013 1:13 pm

Great! Now I wait so I can try this in practice...

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27450
Joined: Sat Jul 30, 2011 7:41 pm

Re: Grayscale option

Fri May 10, 2013 1:29 pm

scrishton wrote:
jamesh wrote:
sharix wrote: I assume there is a similar trick to save only the blue channel? That would be useful for me.
Remember that all the ISP runs in YUV not RGB colour space, so no concept of a blue channel.


Since the 'U' bit of YUV is effectively B-Y, you should be able to get B from something like Y/2 + U - 128.
But that would need to be applied differently to every pixel, which cannot be done using --colfx - that takes a constant value for U and V.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

verasen
Posts: 7
Joined: Mon May 21, 2012 1:22 pm

Re: Grayscale option

Fri May 10, 2013 2:30 pm

Will it be possible to apply custom color effects using the GPU? Can we load shader code into it?

Lawson
Posts: 1
Joined: Fri May 10, 2013 11:43 pm

Re: Grayscale option

Sat May 11, 2013 12:04 am

jamesh wrote:
pluggy wrote:I never understood why you'd want a camera to take monochrome. I'd take it in colour and if I wanted a monochrome 'Arty' picture I'd feed it through an image editor (trivial in most packages) to get a monochrome version, and I'd still have the colour to go back to if I wanted. If you stored it an monochrome from the outset, there isn't a colour version.......
I'm not sure either, but I think its probably useful in certain image analysis techniques to have a greyscale image, in that you don't need to worry about the extra processing involved with colour.
Hi - you need a greyscale image to read in the Infra red spectrum. You would have to remove the IR cut filter (which prevents colour distortion) & the sensor is then sensitive to IR. Also greyscale (8 bit) data is a lot less to process. These techniques are used in ANPR / ALPR which I am exploring!

User avatar
jbeale
Posts: 3734
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Grayscale option

Sat May 11, 2013 7:39 pm

Lawson wrote:Hi - you need a greyscale image to read in the Infra red spectrum.
Well,... strictly speaking- you can take color images in IR- it just isn't very good or useful color. Here is a "color" IR image from a Sony Digital8 camera:
Image

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: Grayscale option

Sun May 12, 2013 9:11 am

jbeale wrote:
Lawson wrote:Hi - you need a greyscale image to read in the Infra red spectrum.
Well,... strictly speaking- you can take color images in IR- it just isn't very good or useful color. Here is a "color" IR image from a Sony Digital8 camera:
Image
You can get some very nice nature pictures with an IR camera. With a suitably modified DSLR, I've seen some beautiful nature shots in color, but the colors just arnt true to life
dan3008 wrote:Pays your money, takes your choice

Return to “Camera board”