Skip to content

Commit

Permalink
GR and GB demosaicing type codes are swapped when passing options to …
Browse files Browse the repository at this point in the history
…Bayer1 algorithms #23

MosaicOrder enum has swapped values
  • Loading branch information
jpsacha committed Jan 15, 2023
1 parent 2e720a4 commit 10c7ad6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Binary file added data/House_bayerGR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Image/J Plugins
* Copyright (C) 2002-2021 Jarek Sacha
* Copyright (C) 2002-2023 Jarek Sacha
* Author's email: jpsacha at gmail [dot] com
*
* This library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -30,12 +30,12 @@ object DeBayer2Config {
* Debayer algorithm type.
*/
enum Demosaicing(val entryName: String) {
case Replication extends Demosaicing("Replication")
case Bilinear extends Demosaicing("Bilinear")
case SmoothHue extends Demosaicing("Smooth Hue")
case Replication extends Demosaicing("Replication")
case Bilinear extends Demosaicing("Bilinear")
case SmoothHue extends Demosaicing("Smooth Hue")
case AdaptiveSmoothHue extends Demosaicing("Adaptive Smooth Hue")
case DDFAPD extends Demosaicing("DDFAPD without Refining")
case DDFAPDRefined extends Demosaicing("DDFAPD with Refining")
case DDFAPD extends Demosaicing("DDFAPD without Refining")
case DDFAPDRefined extends Demosaicing("DDFAPD with Refining")

override def toString: String = entryName
def name: String = entryName
Expand All @@ -53,11 +53,13 @@ object DeBayer2Config {
/**
* Order of filters in Bayer image.
* For instance B-G means that the first pixel in the first row is `B` the next one is `G`.
*
* The `bayer1ID` is the flag used by the Bayer1 algorithms, see [[ij_plugins.debayer2sx.Debayer1#replicate_decode]].
*/
enum MosaicOrder(val entryName: String, val bayer1ID: Int) {
case B_G extends MosaicOrder("B-G", 1)
case G_B extends MosaicOrder("G-B", 3)
case G_R extends MosaicOrder("G-R", 2)
case G_B extends MosaicOrder("G-B", 2)
case G_R extends MosaicOrder("G-R", 3)
case R_G extends MosaicOrder("R-G", 0)

override def toString: String = entryName
Expand Down

0 comments on commit 10c7ad6

Please sign in to comment.