MCPcopy Create free account
hub / github.com/IRMVLab/SemGauss-SLAM / create_window

Function create_window

utils/slam_external.py:37–41  ·  view source on GitHub ↗
(window_size, channel)

Source from the content-addressed store, hash-verified

35
36
37def create_window(window_size, channel):
38 _1D_window = gaussian(window_size, 1.5).unsqueeze(1)
39 _2D_window = _1D_window.mm(_1D_window.t()).float().unsqueeze(0).unsqueeze(0)
40 window = Variable(_2D_window.expand(channel, 1, window_size, window_size).contiguous())
41 return window
42
43def calc_ssim(img1, img2, window_size=11, size_average=True):
44 channel = img1.size(-3)

Callers 1

calc_ssimFunction · 0.85

Calls 1

gaussianFunction · 0.85

Tested by

no test coverage detected