net.sourceforge.javaocr.ocr
Class ByteImage
java.lang.Object
net.sourceforge.javaocr.ocr.AbstractLinearImage
net.sourceforge.javaocr.ocr.ByteImage
- All Implemented Interfaces:
- Image
public class ByteImage
- extends AbstractLinearImage
image backed by byte array
|
Field Summary |
(package private) byte[] |
image
|
|
Constructor Summary |
ByteImage(byte[] image,
int width,
int height)
|
ByteImage(byte[] image,
int arrayWidth,
int arrayHeight,
int originX,
int originY,
int width,
int height)
|
ByteImage(int width,
int height)
|
|
Method Summary |
Image |
chisel(int fromX,
int fromY,
int width,
int height)
chisel out sub-image out of original one. |
int |
get()
retrieve current pixel empty |
void |
put(int value)
save pixel to current position |
String |
toString()
|
| Methods inherited from class net.sourceforge.javaocr.ocr.AbstractLinearImage |
column, copy, flip, get, getArrayHeight, getArrayWidth, getAspectRatio, getHeight, getOriginX, getOriginY, getWidth, hasNext, horizontalSpanEquals, iterateH, iterateH, iterateV, iterateV, next, next, put, row, setCurrentIndex, verticalSpanEquals |
image
byte[] image
ByteImage
public ByteImage(int width,
int height)
ByteImage
public ByteImage(byte[] image,
int width,
int height)
ByteImage
public ByteImage(byte[] image,
int arrayWidth,
int arrayHeight,
int originX,
int originY,
int width,
int height)
get
public int get()
- Description copied from class:
AbstractLinearImage
- retrieve current pixel empty
- Specified by:
get in interface Image- Specified by:
get in class AbstractLinearImage
- Returns:
- current pixel empty
put
public void put(int value)
- Description copied from class:
AbstractLinearImage
- save pixel to current position
- Specified by:
put in interface Image- Specified by:
put in class AbstractLinearImage
chisel
public Image chisel(int fromX,
int fromY,
int width,
int height)
- Description copied from interface:
Image
- chisel out sub-image out of original one. be careful with dimensions -
no internal checks are done. Operation works in place and no data is copied.
- Parameters:
fromX - subimage origin XfromY - subimage origin Ywidth - subimage widthheight - subimage height
- Returns:
- image region as image
toString
public String toString()
- Overrides:
toString in class AbstractLinearImage
Copyright © -2012. All Rights Reserved.