bitxor and Contourlet problem

조회 수: 4 (최근 30일)
Reza Sedagheh
Reza Sedagheh 2019년 8월 12일
답변: TARUN 2025년 5월 28일
Hi Guys,
I read an image and decomposite using Contourlet Transform
in one line I used bitxor function with one of the decomposition coefficent from Contourlet.
but the main problem is bitxor function working with integer but the decomposition image is double.
EIR(m,n) = bitxor(mod(floor(abs(y)*10^15),256),EIRc(m,n));
EIRc(m,n) is double...
could you please help me someone to solve this problem?

답변 (1개)

TARUN
TARUN 2025년 5월 28일
I understand that bitxor" method expects an integer as an argument but EIRc(m,n) returns a double value.
To resolve this, you can convert the double value to uint8 using the uint8 function, which is appropriate if you're working with 8-bit data.
Here’s the updated line of code with the necessary type conversion:
EIR(m, n) = bitxor(uint8(mod(floor(abs(y)*1e15), 256)), uint8(EIRc(m,n)));
You can refer to the documentation for more details on the uint8 function:

카테고리

Help CenterFile Exchange에서 Matrix Decomposition에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by