Need Explanation of Bicubic Interpolation, in imresize inbuilt function of MatLab?

조회 수: 35 (최근 30일)
I have a Image and I want to resize it by factor of 0.5 in C code . So In matlab I can do by using inbuilt function imresize(Image,0.5 'bicubic') .But I have to convert this imresize inbuilt function in C code. So I need expalnation on how imresize function is working in matlab??
Can anyone please Explain me How Can I processd??

답변 (3개)

DGM
DGM 2022년 12월 18일
편집: DGM 2022년 12월 18일
If you're out to replicate imresize(), see this answer:
and this comment:
Also:
I also recall another conversation that I can't find yet. I'll add it if I do. It might have been deleted.
Ultimately, you'll find that the core issue will be the black box that is imresizemex.mexa64. I don't know what's in that.
If you just want any example of 2D interpolation, there are probably more examples around.
  댓글 수: 1
Annu Sheoran
Annu Sheoran 2022년 12월 20일
@DGM sir Matlab is using bicubic interpolation using Convolution algorthim.
I understand in imresize how weights and indics are calculated but not able to understand after that how we can apply these wights on pixcels .
For example
my matrix is
a = [10,20;30,40]; scaling factor 2,method bicubic
weights genrated by matlab
[-0.0234375000000000 0.226562500000000 0.867187500000000 -0.0703125000000000
-0.0703125000000000 0.867187500000000 0.226562500000000 -0.0234375000000000
-0.0234375000000000 0.226562500000000 0.867187500000000 -0.0703125000000000
-0.0703125000000000 0.867187500000000 0.226562500000000 -0.0234375000000000]
final output using imresize
[7.1875 10.1563 16.0938 19.0625
13.1250 16.0938 22.0313 25.0000
25.0000 27.9688 33.9063 36.8750
30.9375 33.9063 39.8438 42.8125]
how they are gettinh this output im not understanding
Can you please help??

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2022년 12월 18일
Did you try
>> edit imresize
  댓글 수: 2
Image Analyst
Image Analyst 2022년 12월 19일
Then see the algorithm here:
and write that in C code. We won't do that for you since we're only about MATLAB code here.

댓글을 달려면 로그인하십시오.


Steven Lord
Steven Lord 2022년 12월 18일
If you have access to MATLAB Coder, the imresize function supports the C / C++ Code Generation extended capability (with some limitations.) See the Extended Capabilities section on its documentation page for more information about what's supported.

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by