Skip to content

Commit

Permalink
color space build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Rode committed Apr 11, 2018
1 parent 25e5983 commit 8ba0dff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plugin-opencv/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>de.serviceflow.frankenstein.plugin</groupId>
<artifactId>api</artifactId>
<version>0.3.7-SNAPSHOT</version>
<version>0.3.6</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
7 changes: 4 additions & 3 deletions plugin-opencv/native/src/main/native/ExternalSample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ void CircleRow(int x, int y, int radius, long rowptr, int xmid, int channels) {
for (int xx=-x; xx<=x; xx++, i+= channels) {
int h = degree(xx, y) * 255 / 360;
int v = 255 - 255 * (xx * xx + y * y) / (radius * radius);
int s = 2 * (v - 128);
int s = 2 * (CLAMP(v, 0, 255) - 128);
if (s<0)
s = -s;
s = 255 - s;
s = 255 + s;
else
s = 255 - s;
data[i+0] = CLAMP(h, 0, 255);
data[i+1] = CLAMP(s, 0, 255);
data[i+2] = CLAMP(v, 0, 255);
Expand Down
2 changes: 1 addition & 1 deletion plugin-opencv/native/win64/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dependency>
<groupId>de.serviceflow.frankenstein.plugin</groupId>
<artifactId>api</artifactId>
<version>0.3.7-SNAPSHOT</version>
<version>0.3.6</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
7 changes: 5 additions & 2 deletions plugin-opencv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!--
<parent>
<groupId>de.serviceflow.frankenstein</groupId>
<artifactId>root</artifactId>
<version>0.3.7-SNAPSHOT</version>
</parent>

-->

<groupId>de.serviceflow.frankenstein.plugin.opencv</groupId>
<artifactId>plugin-parent</artifactId>
<version>0.3.7-SNAPSHOT</version>
<packaging>pom</packaging>

<name>OpenCV Filters - Parent</name>
<!-- Credits to http://www.tricoder.net/blog/?p=197 -->

Expand Down

0 comments on commit 8ba0dff

Please sign in to comment.