class ImageFeature extends Serializable
Each ImageFeature keeps information about single image, it can include various status of an image, e.g. original bytes read from image file, an opencv mat, pixels in float array, image label, meta data and so on. it uses HashMap to store all these data, the key is string that identify the corresponding value
- Alphabetic
- By Inheritance
- ImageFeature
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[T](key: String): T
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
bytes(): Array[Byte]
image file in bytes
-
def
clear(): Unit
clear ImageFeature
-
def
clone(): ImageFeature
- Definition Classes
- ImageFeature → AnyRef
- def contains(key: String): Boolean
-
def
copyTo[T](storage: Array[T], offset: Int, floatKey: String = ImageFeature.floats, toRGB: Boolean = true, greyToRGB: Boolean = false)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Unit
copy the float array to a storage
copy the float array to a storage
- storage
destination array
- offset
offset to copy
- floatKey
key that maps float array
- toRGB
BGR to RGB
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
floats(key: String = ImageFeature.floats): Array[Float]
image pixels in float array
image pixels in float array
- key
key that maps float array
- returns
float array
-
def
getChannel(): Int
get current channel
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getHeight(): Int
get current height
-
def
getImInfo(): Tensor[Float]
imInfo is a tensor that contains height, width, scaleInHeight, scaleInWidth e.g.
imInfo is a tensor that contains height, width, scaleInHeight, scaleInWidth e.g. it is used in SSD and Faster-RCNN to post process the roi detection
-
def
getLabel[T](implicit arg0: ClassTag[T]): T
get label from ImageFeature
-
def
getOriginalChannel: Int
get original channel
-
def
getOriginalHeight: Int
get original height
-
def
getOriginalSize: (Int, Int, Int)
get original image size in (height, width, channel)
get original image size in (height, width, channel)
- returns
(height, width, channel)
-
def
getOriginalWidth: Int
get original width
-
def
getSize: (Int, Int, Int)
get current image size in (height, width, channel)
get current image size in (height, width, channel)
- returns
(height, width, channel)
-
def
getWidth(): Int
get current width
-
def
hasLabel(): Boolean
whether this ImageFeature contains label
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
var
isValid: Boolean
whether this image feature is valid
- def keys(): Set[String]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
opencvMat(): OpenCVMat
get opencv mat from ImageFeature, note that it may be empty if it is released
-
def
predict(key: String = ImageFeature.predict): Any
get prediction result from ImageFeature
get prediction result from ImageFeature
- key
key that maps prediction result
-
def
setLabel(labelMap: Map[String, Float]): Unit
set label for imagefeature from label map
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
toTensor(floatKey: String, toChw: Boolean = true): Tensor[Float]
Convert ImageFeature to image tensor
Convert ImageFeature to image tensor
- floatKey
key that maps the float array
- toChw
transpose the image from hwc to chw
- returns
tensor that represents an image
- def update(key: String, value: Any): Unit
-
def
uri(): String
get uri from ImageFeature
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )