แปลงรูปภาพเป็น GrayScale เป็นหน่วยประมวลผลรูปภาพ
พื้นที่สีที่รองรับ:
การแปลงนี้อ้างอิงจากการแปลง RGB ของ OpenCV เป็น GRAY https://docs.opencv.org/master/de/d25/imgproc_color_conversions.html#color_convert_rgb_gray
บริษัทก่อสร้าง
TransformToGrayscaleOp()
สร้าง TransformToGrayscaleOp
|
วิธีการสาธารณะ
TensorImage | |
int |
getOutputImageHeight(int InputImageHeight, int InputImageWidth)
คำนวณความสูงของรูปภาพเอาต์พุตที่คาดไว้เมื่อระบุขนาดรูปภาพอินพุต
|
int |
getOutputImageWidth(int InputImageHeight, int InputImageWidth)
คำนวณความกว้างของรูปภาพเอาต์พุตที่คาดไว้เมื่อระบุขนาดรูปภาพอินพุต
|
PointF |
inverseTransform(PointF Point, int InputImageHeight, int InputImageWidth)
เปลี่ยนจุดจากระบบพิกัดของรูปภาพผลลัพธ์กลับไปเป็นรูปภาพอินพุตรูปใดรูปหนึ่ง
|
วิธีการที่รับช่วงมา
บริษัทก่อสร้าง
สาธารณะ TransformToGrayscaleOp ()
สร้าง TransformToGrayscaleOp
วิธีการสาธารณะ
สาธารณะ TensorImage apply (TensorImage)
ใช้การเปลี่ยนรูปแบบกับโทนสีเทาและแสดงผล TensorImage
หากรูปภาพที่ป้อนเป็น ColorSpaceType.GRAYSCALE
อยู่แล้ว การดำเนินการดังกล่าวจะไม่ใช่การดำเนินการ
พารามิเตอร์
รูปภาพ |
---|
การขว้าง
IllegalArgumentException | หาก image ไม่ใช่ ColorSpaceType.RGB หรือ ColorSpaceType.GRAYSCALE
|
---|
Public int getOutputImageHeight (int InputImageHeight, int InputImageWidth)
คำนวณความสูงของรูปภาพเอาต์พุตที่คาดไว้เมื่อระบุขนาดรูปภาพอินพุต
พารามิเตอร์
inputImageHeight | |
---|---|
inputImageWidth |
public int getOutputImageWidth (int InputImageHeight, int InputImageWidth)
คำนวณความกว้างของรูปภาพเอาต์พุตที่คาดไว้เมื่อระบุขนาดรูปภาพอินพุต
พารามิเตอร์
inputImageHeight | |
---|---|
inputImageWidth |
สาธารณะ PointF inverseTransform (PointF Point, int InputImageHeight, int InputImageWidth)
เปลี่ยนจุดจากระบบพิกัดของรูปภาพผลลัพธ์กลับไปเป็นรูปภาพอินพุตรูปใดรูปหนึ่ง
พารามิเตอร์
คะแนน | จุดจากระบบพิกัดของผลลัพธ์ |
---|---|
inputImageHeight | ความสูงของรูปภาพอินพุต |
inputImageWidth | ความกว้างของภาพอินพุต |
การคืนสินค้า
- จุดที่มีพิกัดจากระบบพิกัดของรูปภาพอินพุต