modulepackage
0.0.0-20170803023734-e88c363ca727
Repository: https://github.com/technomancers/picamera.git
Documentation: pkg.go.dev
# README
piCamera 
This package is a wrapper for the raspivid
command on the Raspberry Pi. To make development easier on a PC, there is are different Start()
methods depending on what is compiled. One is for the Raspberry Pi and the other is for everything else.
Installation
Since this package depends on a Raspberry Pi only command there is an extra flag needed to build this package for the Raspberry Pi.
env GOOS=linux GOARCH=arm GOARM=7 go build -tags pi -a .
Make note of the -tags pi
on build. Any main
package that has any dependency to this package should have that flag so that this package is built correctly for the Raspberry Pi.
# Functions
New creates an instance of PiCamera.Width and Height are for the image size.ctx is the parent context.
NewArgs returns a RaspividArgs with the default settings.
NewAWBGains creates gains to set to Red and Blue.Values are multiplied to the values so 1.5 is 150% and .5 is 50%.
NewColourEffect creates a colour effect of the U and Y channel of the image.Values should be in the range from (0, 255).
NewROI creates a new Region of Interest.tlx and tly are the top left x and y of ROI.w and h are the width and height of the ROI.All points should be normalized from 0.0 - 1.0.
# Constants
AwbAuto is for automatic white balance.
AwbCloud is for cloudy mode.
AwbFlash flash mode.
AwbFluorescent fluorescent lighting mode.
AwbHorizon horizon mode.
AwbIncandescent incandescent lighting mode.
AwbOff is for turning automatic white balance off.
AwbShade is for shade mode.
AwbSun is for sunny mode.
AwbTungsten tungsten lighting mode.
DRCHigh compress the range even more.
DRCLow compress the range slightly.
DRCMedium compress the range more.
DRCNone is so this package can use whatever the default is.
DRCOff turns of DRC.
ExpAntishake turns on antishake mode.
ExpAuto use automatic exposure mode.
ExpBacklight select setting for backlit subject.
ExpBeach select setting optimised for beach.
ExpFireworks select setting optimised for fireworks.
ExpFixedfps constrain fps to a fixed value.
ExpNight select setting for night shooting.
ExpNone is used to tell this package to use whatever the default is.
ExpSnow select setting optimised for snowy scenery.
ExpSports select setting for sports.
ExpSpotlight select setting for spotlit subject.
ExpVerylong select setting for long exposures.
ImfxBlackboard blackboard effect.
ImfxBlur blur the image.
ImfxDenoise denoise the image.
ImfxEmboss the image.
ImfxFilm film grain effect.
ImfxGPen graphite sketch effect.
ImfxHatch hatch sektch effect.
ImfxNegative invert the image colours.
ImfxNone no effect.
ImfxOilpaint oil paint effect.
ImfxPastel pastel effect.
ImfxPosterise posterise the image.
ImfxSaturation colour saturate the image.
ImfxSketch sketch effect.
ImfxSolarise solarise the image.
ImfxWatercolour watercolour effect.
ImfxWhiteboard whiteboard effect.
MeterAverage average the whole frame for metering.
MeterBacklit will assume a backlit image.
MeterMatrix use matrix metering.
MeterNone tell this package to use whatever the default is.
MeterSpot use spot metering.
ProfileBaseline is for the baseline profile.
ProfileHigh is for a high profile.
ProfileMain is for the main profile.
ProfileNone tells this package to use whatever the default is.
# Structs
AWBGains sets the blue and red gains to be applied when AWBOff is set.
ColourEffect is used fo setting which color effect one wants.
PiCamera creates a way for code to be able to pull images from the camera live.You must start eh raspivid explicitly first but once started, PiCamera will have the latest image available to view.
RaspividArgs are arguments used to set camera settings for the desired outputhttps://www.raspberrypi.org/documentation/raspbian/applications/camera.md.
RegionOfIntrest is used to set the cameras area to be used as the source.
# Type aliases
AWBType is for setting the Automatic White Balance setting.
DRCType is to set the dynamic range compression.
ExposureType is for setting the exposure mode.
ImgEffectType is used for setting the image effect to use.
MeteringType is used for setting the Metering Mode.
ProfileType sets the H264 profile to be used for the encoding.