boofcv.io.wrapper.images
Class MjpegStreamSequence<T extends ImageBase>
- java.lang.Object
-
- boofcv.io.wrapper.images.MjpegStreamSequence<T>
-
- All Implemented Interfaces:
- SimpleImageSequence<T>
public class MjpegStreamSequence<T extends ImageBase> extends java.lang.Object implements SimpleImageSequence<T>
Instead of loading and decompressing the whole MJPEG at once, it loads the images one at a time until it reaches the end of the file.
-
-
Constructor Summary
Constructors Constructor and Description MjpegStreamSequence(java.io.InputStream in, ImageType<T> imageType)MjpegStreamSequence(java.lang.String fileName, ImageType<T> imageType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Call when done reading the image sequence.intgetFrameNumber()Returns the number of the current frame in the sequence.java.awt.image.BufferedImagegetGuiImage()Returns the image in the original format that it was read in as.ImageType<T>getImageType()Returns the type of class used to store the output imageintgetNextHeight()Returns the height of the next imageintgetNextWidth()Returns the width of the next imagebooleanhasNext()If a new image is available.Tnext()Returns the next image available in the sequence.voidreset()Start reading the sequence from the startvoidsetLoop(boolean loop)Sets if the video should loop or not
-
-
-
Method Detail
-
getNextWidth
public int getNextWidth()
Description copied from interface:SimpleImageSequenceReturns the width of the next image- Specified by:
getNextWidthin interfaceSimpleImageSequence<T extends ImageBase>
-
getNextHeight
public int getNextHeight()
Description copied from interface:SimpleImageSequenceReturns the height of the next image- Specified by:
getNextHeightin interfaceSimpleImageSequence<T extends ImageBase>
-
hasNext
public boolean hasNext()
Description copied from interface:SimpleImageSequenceIf a new image is available.- Specified by:
hasNextin interfaceSimpleImageSequence<T extends ImageBase>- Returns:
- true if a new image is available.
-
next
public T next()
Description copied from interface:SimpleImageSequenceReturns the next image available in the sequence.- Specified by:
nextin interfaceSimpleImageSequence<T extends ImageBase>- Returns:
- Next image in the sequence.
-
getGuiImage
public java.awt.image.BufferedImage getGuiImage()
Description copied from interface:SimpleImageSequenceReturns 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:
getGuiImagein interfaceSimpleImageSequence<T extends ImageBase>- Returns:
-
close
public void close()
Description copied from interface:SimpleImageSequenceCall when done reading the image sequence.- Specified by:
closein interfaceSimpleImageSequence<T extends ImageBase>
-
getFrameNumber
public int getFrameNumber()
Description copied from interface:SimpleImageSequenceReturns the number of the current frame in the sequence.- Specified by:
getFrameNumberin interfaceSimpleImageSequence<T extends ImageBase>- Returns:
- Frame ID number.
-
setLoop
public void setLoop(boolean loop)
Description copied from interface:SimpleImageSequenceSets if the video should loop or not- Specified by:
setLoopin interfaceSimpleImageSequence<T extends ImageBase>- Parameters:
loop- true for looping forever, false for once
-
getImageType
public ImageType<T> getImageType()
Description copied from interface:SimpleImageSequenceReturns the type of class used to store the output image- Specified by:
getImageTypein interfaceSimpleImageSequence<T extends ImageBase>
-
reset
public void reset()
Description copied from interface:SimpleImageSequenceStart reading the sequence from the start- Specified by:
resetin interfaceSimpleImageSequence<T extends ImageBase>
-
-
DataMelt 3.0 © DataMelt by jWork.ORG