Class Subtraction
- java.lang.Object
-
- in.itzmeanjan.filterit.arithmetic.Subtraction
-
public class Subtraction extends java.lang.ObjectGiven two images of same dimension it'll apply subtraction operation on each pixel pair & return modified image
-
-
Constructor Summary
Constructors Constructor Description Subtraction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.Color[]extractRow(int row, java.awt.image.BufferedImage img)Given a buffered image & row index, it'll extract out all pixel intensities present along that rowprotected booleanisEligible(java.awt.image.BufferedImage operandOne, java.awt.image.BufferedImage operandTwo)Operand images on which we'll apply any arithmetic operation needs to be of same dimensionjava.awt.image.BufferedImageoperate(java.awt.image.BufferedImage operandOne, java.awt.image.BufferedImage operandTwo, boolean clip)Concurrently applies subtraction operator on two buffered images of same dimension, where each row gets processed in a different thread, making overall execution faster, leveraging power of multi threaded multicore CPUsjava.awt.image.BufferedImageoperate(java.lang.String operandOne, java.lang.String operandTwo, boolean clip)Invokes previous implementation, after reading two operand images into buffered image object
-
-
-
Method Detail
-
operate
public java.awt.image.BufferedImage operate(java.awt.image.BufferedImage operandOne, java.awt.image.BufferedImage operandTwo, boolean clip)Concurrently applies subtraction operator on two buffered images of same dimension, where each row gets processed in a different thread, making overall execution faster, leveraging power of multi threaded multicore CPUs
-
operate
public java.awt.image.BufferedImage operate(java.lang.String operandOne, java.lang.String operandTwo, boolean clip)Invokes previous implementation, after reading two operand images into buffered image object
-
extractRow
protected java.awt.Color[] extractRow(int row, java.awt.image.BufferedImage img)Given a buffered image & row index, it'll extract out all pixel intensities present along that row
-
isEligible
protected boolean isEligible(java.awt.image.BufferedImage operandOne, java.awt.image.BufferedImage operandTwo)Operand images on which we'll apply any arithmetic operation needs to be of same dimension
-
-