net.grelf.grip
Class Raw

java.lang.Object
  extended by net.grelf.grip.Raw

public class Raw
extends java.lang.Object

This class contains only static methods for processing RAW images. It cannot be instantiated.


Method Summary
static java.util.List<Defect> detectDefectivePixels(java.awt.image.BufferedImage bim)
          Get a list of the defective pixels in the given image which is assumed to be a dark field (exposed with the lens covered) so that any pixels at more than fraction Config.RawDefectLevel of the maximum possible raw level in any channel are considered to be defective.
static java.util.List<Defect> detectDefectivePixels(ImFrame imf)
          Ask the user to confirm that this is a dark field image; if so, scan for defective pixels then ask for a CSV file for saving the list.
static void interpret(Image image)
          Convert RAW image to normal by interpolating across zero pixels in each channel.
static void interpret(ImFrame imf)
          Convert RAW image to normal by interpolating across zero pixels in each channel.
static void removeMargin(Image image)
          Remove the non-exposed image margin, the widths of which are set in Config.
static void removeMargin(ImFrame imframe)
          Remove the non-exposed image margin, the widths of which are set in Config.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

detectDefectivePixels

public static java.util.List<Defect> detectDefectivePixels(ImFrame imf)
Ask the user to confirm that this is a dark field image; if so, scan for defective pixels then ask for a CSV file for saving the list. Also return the list. If not, just return null.


detectDefectivePixels

public static java.util.List<Defect> detectDefectivePixels(java.awt.image.BufferedImage bim)
Get a list of the defective pixels in the given image which is assumed to be a dark field (exposed with the lens covered) so that any pixels at more than fraction Config.RawDefectLevel of the maximum possible raw level in any channel are considered to be defective.


interpret

public static void interpret(ImFrame imf)
Convert RAW image to normal by interpolating across zero pixels in each channel. If Config.defects is not null, defective pixels are first replaced by average of 4 neighbours of same colour.


interpret

public static void interpret(Image image)
Convert RAW image to normal by interpolating across zero pixels in each channel. If Config.defects is not null, defective pixels are first replaced by average of 4 neighbours of same colour. We assume that the probability of there being 2 defective pixels with a vertical or horizontal separation of only 2 is low enough to ignore.


removeMargin

public static void removeMargin(ImFrame imframe)
Remove the non-exposed image margin, the widths of which are set in Config.


removeMargin

public static void removeMargin(Image image)
Remove the non-exposed image margin, the widths of which are set in Config.