Packages

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

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ImageFeature
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ImageFeature(bytes: Array[Byte], label: Any = null, uri: String = null)

    Create ImageFeature from original image in byte array, label and uri

    Create ImageFeature from original image in byte array, label and uri

    bytes

    image file in bytes

    label

    label

    uri

    image uri

  2. new ImageFeature()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[T](key: String): T
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def bytes(): Array[Byte]

    image file in bytes

  7. def clear(): Unit

    clear ImageFeature

  8. def clone(): ImageFeature
    Definition Classes
    ImageFeature → AnyRef
  9. def contains(key: String): Boolean
  10. 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

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. 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

  15. def getChannel(): Int

    get current channel

  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def getHeight(): Int

    get current height

  18. 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

  19. def getLabel[T](implicit arg0: ClassTag[T]): T

    get label from ImageFeature

  20. def getOriginalChannel: Int

    get original channel

  21. def getOriginalHeight: Int

    get original height

  22. 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)

  23. def getOriginalWidth: Int

    get original width

  24. 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)

  25. def getWidth(): Int

    get current width

  26. def hasLabel(): Boolean

    whether this ImageFeature contains label

  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. var isValid: Boolean

    whether this image feature is valid

  30. def keys(): Set[String]
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. def opencvMat(): OpenCVMat

    get opencv mat from ImageFeature, note that it may be empty if it is released

  35. def predict(key: String = ImageFeature.predict): Any

    get prediction result from ImageFeature

    get prediction result from ImageFeature

    key

    key that maps prediction result

  36. def setLabel(labelMap: Map[String, Float]): Unit

    set label for imagefeature from label map

  37. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  38. def toString(): String
    Definition Classes
    AnyRef → Any
  39. 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

  40. def update(key: String, value: Any): Unit
  41. def uri(): String

    get uri from ImageFeature

  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped