how to set the camera in raspberry pi to take black and white image?

Physicist

Are there any ways to set the camera in raspberry pi to take black and white image?, like using some commands / code in picamera library?

Since I need to compare the relative light intensity of a few different images, I'm worried that the camera will already so some adjustments itself when the object is under different illuminations, so even if I convert the image to black and white later on the object's 'true' black and white image will have been lost.

thanks

edit: basically what I need to do is to capture a few images of an object when the camera position is fixed, but the position of the light source is changed (and so the direction of illumination is changed as well). Then for each point on the image I will need to compare the relative light intensity of the different images. As long as the light intensity, or the 'brightness' of all the images are relative to the same scale, then it's ok, but I'm not sure if this is the case. I'm sure if the camera will adjust something like contrast automatically itself when an image is 'inherently' darker or brighter.

Hobbert Evergreen

To get a black and white image (monochrome, grayscale), just configure your camera. Create a "takeashot.py" ( sudo nano takeashot.py ):

import picamera                  # import files

camera = picamera.PiCamera()     # initialize camera
camera.color_effects = (128,128) # turn camera to black and white
camera.capture('image1.jpg')     # take a shot

Execute: sudo python takeashot.py

That´s it

You can learn more at 10. API - picamera.camera Module

Under color_effects, you read "to make the image black and white set the value to (128, 128)."

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Can I take Black and White pictures using android camera intent?

From Dev

Can I take Black and White pictures using android camera intent?

From Dev

How to create an image with black and white pixels?

From Dev

How to convert image black to white and vice versa

From Dev

How to invert black and white with scikit-image?

From Dev

How to make image background white instead of black?

From Dev

How to convert a photo to a black and white image by ImageMagick?

From Dev

How to increase contrast of a black and white image?

From Dev

How to set up raspberry Pi as gateway server?

From Dev

Heroku black and white image

From Dev

Raspberry Pi camera writing permissions

From Dev

How much internet bandwidth will a raspberry pi node server take

From Dev

Pi camera preview with GUI - Raspberry Pi

From Dev

how to set camera Image orientation?

From Dev

How does this color matrix make image black and white?

From Dev

How to apply black and white filter on image using BufferedImageOp?

From Dev

how to tint a black and white .png image to a certain color in Java

From Dev

How to apply black and white filter on image using BufferedImageOp?

From Dev

How to use dithering to display an gray image with only black and white pixels?

From Dev

How to make black and white dotted image in photoshop.?

From Dev

how to set text color of status bar (other than white and black)

From Dev

how to set text color of status bar (other than white and black)

From Dev

Make image Black and White Javascript

From Dev

Black CSS image overlay is white

From Dev

Convert RGB image to black and white

From Dev

Canvas Black and White Image to Shape

From Dev

Make image Black and White Javascript

From Dev

MATLAB: RGB to white and black image

From Dev

Is Java running well in BeagleBone Black( or Raspberry Pi)?

Related Related

  1. 1

    Can I take Black and White pictures using android camera intent?

  2. 2

    Can I take Black and White pictures using android camera intent?

  3. 3

    How to create an image with black and white pixels?

  4. 4

    How to convert image black to white and vice versa

  5. 5

    How to invert black and white with scikit-image?

  6. 6

    How to make image background white instead of black?

  7. 7

    How to convert a photo to a black and white image by ImageMagick?

  8. 8

    How to increase contrast of a black and white image?

  9. 9

    How to set up raspberry Pi as gateway server?

  10. 10

    Heroku black and white image

  11. 11

    Raspberry Pi camera writing permissions

  12. 12

    How much internet bandwidth will a raspberry pi node server take

  13. 13

    Pi camera preview with GUI - Raspberry Pi

  14. 14

    how to set camera Image orientation?

  15. 15

    How does this color matrix make image black and white?

  16. 16

    How to apply black and white filter on image using BufferedImageOp?

  17. 17

    how to tint a black and white .png image to a certain color in Java

  18. 18

    How to apply black and white filter on image using BufferedImageOp?

  19. 19

    How to use dithering to display an gray image with only black and white pixels?

  20. 20

    How to make black and white dotted image in photoshop.?

  21. 21

    how to set text color of status bar (other than white and black)

  22. 22

    how to set text color of status bar (other than white and black)

  23. 23

    Make image Black and White Javascript

  24. 24

    Black CSS image overlay is white

  25. 25

    Convert RGB image to black and white

  26. 26

    Canvas Black and White Image to Shape

  27. 27

    Make image Black and White Javascript

  28. 28

    MATLAB: RGB to white and black image

  29. 29

    Is Java running well in BeagleBone Black( or Raspberry Pi)?

HotTag

Archive