public abstract class VideoImageProcessing<T extends boofcv.struct.image.ImageBase<T>> extends VideoRenderProcessing<T>
lockConvert, lockGui, outputHeight, outputWidth, scale, tranX, tranY, view| Modifier | Constructor and Description |
|---|---|
protected |
VideoImageProcessing(boofcv.struct.image.ImageType<T> imageType)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
declareImages(int width,
int height) |
protected void |
process(T gray)
Image processing is done here and is invoked in its own thread, removing any hard time constraints.
|
protected abstract void |
process(T image,
android.graphics.Bitmap output,
byte[] storage)
Process video stream and computes output Bitmap for display.
|
protected void |
render(android.graphics.Canvas canvas,
double imageToOutput)
Results computed by
VideoRenderProcessing.process(T) are visualized here. |
convertPreview, getScale, getTranX, getTranY, imageToOutput, init, onDraw, outputToImage, run, stopProcessingactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected VideoImageProcessing(boofcv.struct.image.ImageType<T> imageType)
imageType - Type of image the video stream is to be converted toprotected void declareImages(int width,
int height)
declareImages in class VideoRenderProcessing<T extends boofcv.struct.image.ImageBase<T>>protected void process(T gray)
VideoRenderProcessingImage processing is done here and is invoked in its own thread, removing any hard time constraints.
When modifying data structures that are read inside of VideoRenderProcessing.render(android.graphics.Canvas, double) be sure to use synchronize with
VideoRenderProcessing.lockGui to avoid crashes or weird visual artifacts. Use of lockGui should be minimized to
ensure a fast and responsive GUI
process in class VideoRenderProcessing<T extends boofcv.struct.image.ImageBase<T>>protected void render(android.graphics.Canvas canvas,
double imageToOutput)
VideoRenderProcessingVideoRenderProcessing.process(T) are visualized here. This function is called inside a
synchronize(lockGui) block. The provided canvas has been adjusted to be centered in the view and to account
for the resolution difference of the preview image and the display.render in class VideoRenderProcessing<T extends boofcv.struct.image.ImageBase<T>>canvas - Canvas which is to be displayed.imageToOutput - Scale factor from input image to output display. Can also be accessed via VideoRenderProcessing.getScale()protected abstract void process(T image, android.graphics.Bitmap output, byte[] storage)
image - (Input) Video stream translated into a BoofCV type image.output - (Output) Storage for Bitmap image which is to be displayed.storage - Array which can be used when converting the boofcv image into a Bitmap.