Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
lambdalabs
/
LambdaSuperRes
like
13
Running
App
Files
Files
Community
1
Fetching metadata from the HF Docker repository...
2514fb4
LambdaSuperRes
/
KAIR
/
matlab
/
center_replace.m
cooperll
LambdaSuperRes initial commit
2514fb4
over 2 years ago
raw
Copy download link
history
blame
Safe
157 Bytes
function [im]
=
center_replace(im,im2)
[w,h,~]
=
size(im);
[a,b,~]
=
size(im2);
c1
=
w-a-(w-a)/
2
;
c2
=
h-b-(h-b)/
2
;
im(c1+
1
:c1+a,c2+
1
:c2+b,:)
=
im2;
end