Git Product home page Git Product logo

ijp-color's Introduction

ijp-color

Operations on color spaces and color images. Can be used as a stand-alone library or a plugin for ImageJ

Actions Status Maven Central Scaladoc

ImageJ Plugins

IJP Color Calibrator

Color calibrates images using a color chart. Supported charts:

  • GretagMacbeth ColorChecker
  • X-Rite Passport
  • Image Science Associates ColorGauge
  • Custom charts - provide your own layout and CIE L*a*b* color values

Supports 8, 16, 32 bit per channel color images, including raw.

Image Calibrator

More details in project Wiki under Color Calibrator

IJP Color Calculator

Tool for converting individual color values between different color spaces. Inspired by Bruce Lindbloom CIE Color Calculator

Image Calibrator

More details in project Wiki under Color Calculator

IJP Color Chart ROI Tool

Converts color chart ROI to individual chip ROIs. Measures color of each chip.

Chart Tool

More details in project Wiki under Color Chart ROI Tool

IJP White Balance

Performs White Balance of an RGB image.

Chart Tool

More details in project Wiki under White Balance

Test Images

You can test the calibrator plugin using images in test/data.

Installing Plugins in ImageJ

ImageJ

Option 1

Prebuild binaries are published with each Release.

  1. Look for in the asset section for an "ijp-color_plugins_*_win.zip" file assuming you are using Windows, or "ijp-color_plugins_*_mac*.zip" for MacOS. Do now download the "Source code".
  2. Download and unzip into ImageJ's plugins directory. It should create subdirectory "ij-plugins". There should be several files with extension *.jar
  3. Restart ImageJ

Option 2 (less frequently updated)

IJP Color is also a part of the ij-plugins-bundle. You can download from its Release page.

ImageJ2/FIJI

NOTE: no recent updates with this method, due to issues with FIJI and JavaFX updates.

IJP Color is a part of the ij-plugins-bundle that is also distributed for FIJI/ImageJ2 as IJ-Plugins Update Site: "https://sites.imagej.net/IJ-Plugins/"

Troubleshooting

Depending on your ImageJ installation there may be issues properly loading the ijp-color plugin components, see Troubleshooting Wiki for some hints. Please post your experience or ask questions in the Troubleshooting Discussions.

Stand-alone Library

ijp-color was designed to be easily used as a stand-alone library. Examples of use are provided in the ijp-color/test directory.

Development Setup

The minimum requirement to build an run the plugin in development environment is Java and SBT. SBT will download all needed dependencies. Key libraries: ImageJ, Scala, and ScalaFX.

Command line

You can build the ij-color plugins and run it within ImageJ using SBT task ijRun from the experimental module:

sbt ijRun

IntelliJ

You will need to install Scala plugin then import the project from build.sbt file. To run the ij-color plugins in ImageJ, setup "Run Configuration" for "SBT Task" and add task experimental/ijRun.

ijp-color's People

Contributors

jpsacha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ijp-color's Issues

API: ColorChart should be immutable

Currently all fields, but alignmentTransform, are assumed immutable. Make alignmentTransform immutable and add mutability guards for other fields, e.g., copy mutable objects like arrays.

[Calibrator] Allow use of custom charts

Allow user creation of a custom color chart where user provides:

  • number of columns
  • number of rows
  • reference white
  • CIE L*a*b* reference color values for each chip for given the reference while

NPE on OSX when starting Color Calculator or Calibrator

java.lang.NullPointerException
	at net.sf.ij_plugins.util.ImageConverter$.toBufferImage(ImageConverter.scala:45)
	at net.sf.ij_plugins.util.ImageConverter$.toBufferImage(ImageConverter.scala:37)
	at net.sf.ij_plugins.util.ImageConverter$.toFXImage(ImageConverter.scala:55)
	at net.sf.ij_plugins.util.IJTools$.imageJIconAsFXImage(IJTools.scala:51)
	at net.sf.ij_plugins.color.converter.ui.ColorConverterPlugin$$anon$1$$anon$2.<init>(ColorConverterPlugin.scala:57)
	at net.sf.ij_plugins.color.converter.ui.ColorConverterPlugin$$anon$1.<init>(ColorConverterPlugin.scala:55)
	at net.sf.ij_plugins.color.converter.ui.ColorConverterPlugin.$anonfun$run$1(ColorConverterPlugin.scala:53)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at scalafx.application.Platform$$anon$1.run(Platform.scala:78)
	at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

The set a null icon on OSX.

Error running Color Calibrator in Image J

I downloaded the latest ImageJ and ijp-color. I can run the Color chart tool but if I try the Color calibrator I get an error message 'Unknown Error' with this output:

java.security.PrivilegedActionException: javafx.fxml.LoadException:
file:/C:/Users/ADMINI~1/Desktop/ImageJ/plugins/ij-plugins/ijp-color-ui_2.13-0.9.0.jar!/net/sf/ij_plugins/color/ui/calibration/ColorCalibrator.fxml:29

at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
Caused by: javafx.fxml.LoadException:
file:/C:/Users/ADMINI~1/Desktop/ImageJ/plugins/ij-plugins/ijp-color-ui_2.13-0.9.0.jar!/net/sf/ij_plugins/color/ui/calibration/ColorCalibrator.fxml:29

at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
at javafx.fxml.FXMLLoader.access$700(FXMLLoader.java:103)
at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:922)
at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:971)
at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:220)
at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:744)
at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at scalafxml.core.FXMLView$.apply(FXMLView.scala:19)
at org.scalafx.extras.mvcfx.MVCfx.createFXMLView(MVCfx.scala:129)
at org.scalafx.extras.mvcfx.MVCfx.view$lzycompute(MVCfx.scala:71)
at org.scalafx.extras.mvcfx.MVCfx.view(MVCfx.scala:70)
at net.sf.ij_plugins.color.ui.calibration.ColorCalibratorPlugin.$anonfun$run$1(ColorCalibratorPlugin.scala:99)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at scalafx.application.Platform$$anon$1.run(Platform.scala:148)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
... 6 more
Caused by: java.lang.ClassNotFoundException: net.sf.ij_plugins.color.ui.calibration.ColorCalibratorUIController
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:920)
... 21 more

I've tried this on Windows 7, Windows 10, Windows Server 2012 R2 and also tried a number of older ImageJ and ijp-color releases but no luck with any of these combinations.

If I try to run the Color calculator I get an error message "Invalid URL" with this output:

java.lang.IllegalArgumentException: Invalid URL: Invalid URL or resource not found
at javafx.scene.image.Image.validateUrl(Image.java:1118)
at javafx.scene.image.Image.(Image.java:620)
at javafx.scene.image.ImageView.(ImageView.java:166)
at scalafx.scene.image.ImageView.(ImageView.scala:55)
at net.sf.ij_plugins.color.ui.util.IJPUtils$.createHeaderNode(IJPUtils.scala:146)
at net.sf.ij_plugins.color.ui.converter.ColorConverterView.createGidPane(ColorConverterView.scala:137)
at net.sf.ij_plugins.color.ui.converter.ColorConverterView.pane$lzycompute(ColorConverterView.scala:60)
at net.sf.ij_plugins.color.ui.converter.ColorConverterView.pane(ColorConverterView.scala:60)
at net.sf.ij_plugins.color.ui.converter.ColorConverterPlugin$$anon$1$$anon$2.(ColorConverterPlugin.scala:76)
at net.sf.ij_plugins.color.ui.converter.ColorConverterPlugin$$anon$1.(ColorConverterPlugin.scala:73)
at net.sf.ij_plugins.color.ui.converter.ColorConverterPlugin.$anonfun$run$1(ColorConverterPlugin.scala:71)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at scalafx.application.Platform$$anon$1.run(Platform.scala:148)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Invalid URL or resource not found
at javafx.scene.image.Image.validateUrl(Image.java:1110)
... 19 more

Do not include JavaFX as transitive dependency

JavaFX dependency is OS dependent, when you make it a transitive dependency, chance is that somebody using it on different OS than that it was build for will run into issues.

In SBT mark JavaFX dependencies as "provided".

Mode for comuting 3x3 color correction matrices

As discussed in this issue: #51

I am interested in computing a 3x3 color correction matrix for a camera sensor based on captured images of a Macbeth style color checker chart.

4x3 color correction matrices are also of interest but effectively covered by the current linear cross plane option.

Display image with overlay of target color for each chip

Help to visualize how target values compare to actual chip color values by displaying target patches on top of each chip. For original image that would be reference value for corrected color image that would be sRGB value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.