Package boofcv.javacv
Class WebcamOpenCV.SimpleSequence<T extends ImageBase<T>>
java.lang.Object
boofcv.javacv.WebcamOpenCV.SimpleSequence<T>
- All Implemented Interfaces:
SimpleImageSequence<T>
- Enclosing class:
- WebcamOpenCV
public static class WebcamOpenCV.SimpleSequence<T extends ImageBase<T>>
extends Object
implements SimpleImageSequence<T>
-
Constructor Summary
ConstructorDescriptionSimpleSequence
(org.bytedeco.javacv.OpenCVFrameGrabber grabber, ImageType<T> imageType) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Call when done reading the image sequence.int
Returns the number of the current frame in the sequence.<InternalImage>
InternalImageReturns the image in the original format that it was read in as.int
Returns the height of the current imagegetImage()
Returns the currently loaded image in the sequenceReturns the type of class used to store the output imageint
getWidth()
Returns the width of the current imageboolean
hasNext()
If a new image is available.next()
Steps to the next image in the sequence and loads it.void
reset()
Start reading the sequence from the startvoid
setLoop
(boolean loop) Sets if the video should loop or not
-
Constructor Details
-
SimpleSequence
-
-
Method Details
-
getWidth
public int getWidth()Description copied from interface:SimpleImageSequence
Returns the width of the current image- Specified by:
getWidth
in interfaceSimpleImageSequence<T extends ImageBase<T>>
-
getHeight
public int getHeight()Description copied from interface:SimpleImageSequence
Returns the height of the current image- Specified by:
getHeight
in interfaceSimpleImageSequence<T extends ImageBase<T>>
-
hasNext
public boolean hasNext()Description copied from interface:SimpleImageSequence
If a new image is available.- Specified by:
hasNext
in interfaceSimpleImageSequence<T extends ImageBase<T>>
- Returns:
- true if a new image is available.
-
next
Description copied from interface:SimpleImageSequence
Steps to the next image in the sequence and loads it.- Specified by:
next
in interfaceSimpleImageSequence<T extends ImageBase<T>>
- Returns:
- The next image in the sequence, which is now the current image.
-
getImage
Description copied from interface:SimpleImageSequence
Returns the currently loaded image in the sequence- Specified by:
getImage
in interfaceSimpleImageSequence<T extends ImageBase<T>>
-
getGuiImage
public <InternalImage> InternalImage getGuiImage()Description copied from interface:SimpleImageSequence
Returns the image in the original format that it was read in as. When dealing with swing or any standard Java SE environment this will almost always be BufferedImage. The type has been abstracted out to provide better Android support.- Specified by:
getGuiImage
in interfaceSimpleImageSequence<T extends ImageBase<T>>
-
close
public void close()Description copied from interface:SimpleImageSequence
Call when done reading the image sequence.- Specified by:
close
in interfaceSimpleImageSequence<T extends ImageBase<T>>
-
getFrameNumber
public int getFrameNumber()Description copied from interface:SimpleImageSequence
Returns the number of the current frame in the sequence.- Specified by:
getFrameNumber
in interfaceSimpleImageSequence<T extends ImageBase<T>>
- Returns:
- Frame ID number.
-
setLoop
public void setLoop(boolean loop) Description copied from interface:SimpleImageSequence
Sets if the video should loop or not- Specified by:
setLoop
in interfaceSimpleImageSequence<T extends ImageBase<T>>
- Parameters:
loop
- true for looping forever, false for once
-
getImageType
Description copied from interface:SimpleImageSequence
Returns the type of class used to store the output image- Specified by:
getImageType
in interfaceSimpleImageSequence<T extends ImageBase<T>>
-
reset
public void reset()Description copied from interface:SimpleImageSequence
Start reading the sequence from the start- Specified by:
reset
in interfaceSimpleImageSequence<T extends ImageBase<T>>
-