jp.digitalmuseum.capture
クラス RawImageUtils

java.lang.Object
  上位を拡張 jp.digitalmuseum.capture.RawImageUtils

public class RawImageUtils
extends java.lang.Object
Utility class for handling image data in a byte array.
作成者:
Jun KATO

コンストラクタの概要
RawImageUtils()
           
 
メソッドの概要
static byte[] reverse(byte[] pixels, int width, boolean reverseX, boolean reverseY)
          Reverse RGB/BGR image data in a byte array.
static byte[] reverseGrayScale(byte[] pixels, int width, boolean reverseX, boolean reverseY)
          Reverse gray-scale image data in a byte array.
static byte[] rgbToBgr(byte[] pixels)
          Convert an image data array in RGB order to BGR or vice versa.
static byte[] rgbToGrayScale(byte[] pixels)
          Convert image data from RGB to gray-scale in a byte array.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
コンストラクタの詳細

RawImageUtils

public RawImageUtils()
メソッドの詳細

rgbToGrayScale

public static byte[] rgbToGrayScale(byte[] pixels)
Convert image data from RGB to gray-scale in a byte array.

reverseGrayScale

public static byte[] reverseGrayScale(byte[] pixels,
                                      int width,
                                      boolean reverseX,
                                      boolean reverseY)
Reverse gray-scale image data in a byte array.
パラメータ:
pixels - Image data in a byte array.
width - Width of the image [pixel].
reverseX - To reverse the image by X axis or not.
reverseY - To reverse the image by Y axis or not.
戻り値:
Reversed image data in a new byte array.

rgbToBgr

public static byte[] rgbToBgr(byte[] pixels)
Convert an image data array in RGB order to BGR or vice versa.
パラメータ:
pixels - Image data in a byte array.
戻り値:
Converted image data array.

reverse

public static byte[] reverse(byte[] pixels,
                             int width,
                             boolean reverseX,
                             boolean reverseY)
Reverse RGB/BGR image data in a byte array.
パラメータ:
pixels - Image data in a byte array.
width - Width of the image [pixel].
reverseX - To reverse the image by X axis or not.
reverseY - To reverse the image by Y axis or not.
戻り値:
Reversed image data in a new byte array.


Copyright by Jun KATO (arc@dmz) at https://mr.digitalmuseum.jp/