Coder Social home page Coder Social logo

acmh's People

Contributors

ghixu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar

acmh's Issues

invalid bilateral space sigma parameter

image

In the code settings

the bilateral space weighting is almost truncated flat part of Gaussian distribution.
only 15% from the peak to valley, shown by the top image.

Even set the same weight in the kernel, no visual difference from the result.

image
The above weight distribution is more space logic?
The idea is 3 * sigma cover the 99% Gaussian.

min = 0.8681234453945849
max = 1.0
max/min = 1.151909910168909

import cv2
import numpy as np

# ksize  = 31
ksize  = 11
center = ksize // 2
# sigma  = ksize / 3 / 2 / 1.6627
sigma  = 5
A = np.zeros((ksize, ksize), dtype=float)

for y in range(ksize):
    for x in range(ksize):
        distX = x - center
        distY = y - center
        dist  = np.sqrt(distX*distX + distY*distY)
        v     = np.exp(-dist / (2*sigma*sigma))
        A[y, x] = v

minV = np.min(A[:])
maxV = np.max(A[:])
print(minV, maxV, maxV/minV)

A = cv2.resize(A, (256, 256))

cv2.imshow('img', A)
cv2.waitKey()

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.