orx-kinect refactoring + new general orx-depth-camera (#257)

This commit is contained in:
Kazik Pogoda
2022-08-24 20:53:50 +02:00
committed by GitHub
parent c398aaa392
commit b7fc8918f4
39 changed files with 1792 additions and 725 deletions

View File

@@ -0,0 +1,24 @@
package org.openrndr.extra.fx.colormap
import org.openrndr.draw.Filter
import org.openrndr.extra.fx.mppFilterShader
import org.openrndr.extra.parameters.DoubleParameter
abstract class ColormapFilter(code: String, name: String) : Filter(mppFilterShader(code, name)) {
@DoubleParameter(label = "min value", low = 0.0, high = 1.0, order = 0)
var minValue: Double by parameters
@DoubleParameter(label = "max value", low = 0.0, high = 1.0, order = 1)
var maxValue: Double by parameters
@DoubleParameter(label = "curve", low = 0.001, high = 10.0, order = 2)
var curve: Double by parameters
init {
minValue = 0.0
maxValue = 1.0
curve = 1.0
}
}

View File

@@ -0,0 +1,10 @@
package org.openrndr.extra.fx.colormap
import org.openrndr.extra.fx.fx_grayscale_colormap
import org.openrndr.extra.parameters.Description
/**
* Maps values of the RED color channel to grayscale.
*/
@Description("grayscale colormap")
class GrayscaleColormap : ColormapFilter(fx_grayscale_colormap, "grayscale-colormap")

View File

@@ -0,0 +1,13 @@
package org.openrndr.extra.fx.colormap
import org.openrndr.extra.fx.fx_spectral_zucconi_colormap
import org.openrndr.extra.parameters.Description
/**
* Maps values of the RED color channel to natural light dispersion spectrum as described
* by Alan Zucconi in the
* [Improving the Rainbow](https://www.alanzucconi.com/2017/07/15/improving-the-rainbow/)
* article.
*/
@Description("spectral colormap")
class SpectralZucconiColormap : ColormapFilter(fx_spectral_zucconi_colormap, "spectral-zucconi-colormap")

View File

@@ -0,0 +1,12 @@
package org.openrndr.extra.fx.colormap
import org.openrndr.extra.fx.fx_turbo_colormap
import org.openrndr.extra.parameters.Description
/**
* Maps values of the RED color channel to Turbo Colormap according to
* [Turbo, An Improved Rainbow Colormap for Visualization](https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html)
* by Google.
*/
@Description("turbo colormap")
open class TurboColormap : ColormapFilter(fx_turbo_colormap, "turbo-colormap")