Comments (3)
Since the individual ssim values for each pixel calculated in the loop in dssim_compare_channel
can be both > 1 ((more equal than equal!), see the color picker image below) or < 0 (images above), we are currently using the following workaround:
@@ -748,9 +750,11 @@ static double dssim_compare_channel(const dssim_chan *restrict original, dssim_c
const double sigma2_sq = img2_sq_blur[offset] - mu2_sq;
const double sigma12 = img1_img2_blur[offset] - mu1_mu2;
- const double ssim = (2.0 * mu1_mu2 + c1) * (2.0 * sigma12 + c2)
+
+
+ const double ssim = MIN(MAX((2.0 * mu1_mu2 + c1) * (2.0 * sigma12 + c2)
/
- ((mu1_sq + mu2_sq + c1) * (sigma1_sq + sigma2_sq + c2));
+ ((mu1_sq + mu2_sq + c1) * (sigma1_sq + sigma2_sq + c2)), 0), 1.0);
ssim_sum += ssim;
from dssim.
I get also an undefined behavior:
src/dssim.c:715:30: runtime error: division by zero
from dssim.
Please try 2.8.0
from dssim.
Related Issues (20)
- Consider evaluating DSSIM using CLIC-2021 peceptual quality task HOT 6
- Controlling/limiting the CPU and Memory usage HOT 2
- NodeJS binding? HOT 2
- Add option to install directly from crates.io in README HOT 1
- Broken AVIF feature HOT 2
- Cannot be used for WASM because of multithreading? HOT 3
- Missing 'itertools::Itertools' for `zip_eq` in dssim-core when using wasm HOT 2
- Canβt compile with webp[-static] features
- Feature Request: Add an examples folder HOT 2
- Excessive memory consumption with multiple modified files in CLI HOT 1
- Feature request: set `scale_weights` in CLI HOT 7
- [Help] How to simply compare two JPEG images in memory HOT 3
- Question: Can a shared library be built? HOT 2
- Fails to build on armv5, armv7, armv7l and ppc HOT 5
- Why does the -o flag create 5 images in different sizes HOT 1
- version `GLIBC_2.18' not found HOT 1
- How do I install dssim.h into the prefix? HOT 3
- Ranking HOT 2
- Wasm HOT 3
- error in c HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dssim.