Class Addition
- java.lang.Object
-
- in.itzmeanjan.filterit.arithmetic.Addition
-
public class Addition extends java.lang.Object
Given two images of same dimention it'll apply addition operation on each pixel pair & return modified image
-
-
Constructor Summary
Constructors Constructor Description Addition()
-
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 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 dimensionjava.awt.image.BufferedImage
operate(java.awt.image.BufferedImage operandOne, java.awt.image.BufferedImage operandTwo, boolean clip)
Concurrently applies addition operator on two buffered images of same dimension, where each row gets processed in a different thread, making overall execution faster, leveraging power of multicore CPUsjava.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
-
-
-
Method Detail
-
operate
public java.awt.image.BufferedImage operate(java.awt.image.BufferedImage operandOne, java.awt.image.BufferedImage operandTwo, boolean clip)
Concurrently applies addition operator on two buffered images of same dimension, where each row gets processed in a different thread, making overall execution faster, leveraging power of 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
-
-