Is histogram “function” linear?
$begingroup$
I was ask to prove/disprove if for two given images $f_1(x,y)$ and $f_2(x,y)$ the histogram of $f_1(x,y)-f_2(x,y)$ and $h_1-h_2$ are equal, where $h_i$ is the histogram of image i.
Intuitively it seems to be correct, as if we look at the images as matrices, the histogram is a function that take the matrix values and count the number of repetitions ("losing" the indices of each value)
But is there a proper mathematically proof?
statistics image-processing
$endgroup$
add a comment |
$begingroup$
I was ask to prove/disprove if for two given images $f_1(x,y)$ and $f_2(x,y)$ the histogram of $f_1(x,y)-f_2(x,y)$ and $h_1-h_2$ are equal, where $h_i$ is the histogram of image i.
Intuitively it seems to be correct, as if we look at the images as matrices, the histogram is a function that take the matrix values and count the number of repetitions ("losing" the indices of each value)
But is there a proper mathematically proof?
statistics image-processing
$endgroup$
add a comment |
$begingroup$
I was ask to prove/disprove if for two given images $f_1(x,y)$ and $f_2(x,y)$ the histogram of $f_1(x,y)-f_2(x,y)$ and $h_1-h_2$ are equal, where $h_i$ is the histogram of image i.
Intuitively it seems to be correct, as if we look at the images as matrices, the histogram is a function that take the matrix values and count the number of repetitions ("losing" the indices of each value)
But is there a proper mathematically proof?
statistics image-processing
$endgroup$
I was ask to prove/disprove if for two given images $f_1(x,y)$ and $f_2(x,y)$ the histogram of $f_1(x,y)-f_2(x,y)$ and $h_1-h_2$ are equal, where $h_i$ is the histogram of image i.
Intuitively it seems to be correct, as if we look at the images as matrices, the histogram is a function that take the matrix values and count the number of repetitions ("losing" the indices of each value)
But is there a proper mathematically proof?
statistics image-processing
statistics image-processing
edited Jan 17 at 20:10
gbox
asked Jan 17 at 19:56
gboxgbox
5,45562262
5,45562262
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Consider one-dimensional images
$$f_1=[0,0,0,1]$$
$$f_2=[0,1,0,0]$$
Then we can say that
$$h_1=begin{bmatrix}(-1,0)\(0,3)\(1,1)end{bmatrix}$$
$$h_2=begin{bmatrix}(-1,0)\(0,3)\(1,1)end{bmatrix}$$
$$h_1-h_2=begin{bmatrix}(-1,0)\(0,0)\(1,0)end{bmatrix}$$
$$f_1-f_2=[0,-1,0,1]$$
$$h_{1-2}=begin{bmatrix}(-1,1)\(0,2)\(1,1)end{bmatrix}$$
In general, if two images are different from each other but have the same histogram, then the histogram of the difference of the images will not be equal to the difference of the histograms.
Have I misunderstood something? I don't know if there's even a rigorous idea of "histogram subtraction".
$endgroup$
add a comment |
$begingroup$
No, the difference of histograms of images is not equal to the histogram of difference of images.
Consider the following counter example:
$f_1$ image of dimensions $1 times 1$ with $f_1(0,0) = 0$,
$f_2$ image of dimensions $1 times 1$ with $f_2(0,0) = 1$.
Define $f_d(0,0) = f_1(0,0) - f_2(0,0) = 0 - 1 = -1$. Now take the histograms:
- $h[f_1](x) = begin{cases} 0 & text{for } x = 1,\
1 & text{for } x = 0,\
0 & text{for } x = -1,
end{cases}$ - $h[f_2](x) = begin{cases} 1 & text{for } x = 1,\
0 & text{for } x = 0,\
0 & text{for } x = -1,
end{cases}$ - $h[f_1 - f_2](x) = begin{cases} 0 & text{for } x = 1,\
0 & text{for } x = 0,\
1 & text{for } x = -1.
end{cases}$
The histogram difference results to be
- $(h[f_1] - h[f_2])(x) = begin{cases} -1 & text{for } x = 1,\
1 & text{for } x = 0,\
0 & text{for } x = -1.
end{cases}$
Hence we deduce that the histogram operator is not linear:
$$ h[f_1 - f_2] neq h[f_1] - h[f_2].$$
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3077434%2fis-histogram-function-linear%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Consider one-dimensional images
$$f_1=[0,0,0,1]$$
$$f_2=[0,1,0,0]$$
Then we can say that
$$h_1=begin{bmatrix}(-1,0)\(0,3)\(1,1)end{bmatrix}$$
$$h_2=begin{bmatrix}(-1,0)\(0,3)\(1,1)end{bmatrix}$$
$$h_1-h_2=begin{bmatrix}(-1,0)\(0,0)\(1,0)end{bmatrix}$$
$$f_1-f_2=[0,-1,0,1]$$
$$h_{1-2}=begin{bmatrix}(-1,1)\(0,2)\(1,1)end{bmatrix}$$
In general, if two images are different from each other but have the same histogram, then the histogram of the difference of the images will not be equal to the difference of the histograms.
Have I misunderstood something? I don't know if there's even a rigorous idea of "histogram subtraction".
$endgroup$
add a comment |
$begingroup$
Consider one-dimensional images
$$f_1=[0,0,0,1]$$
$$f_2=[0,1,0,0]$$
Then we can say that
$$h_1=begin{bmatrix}(-1,0)\(0,3)\(1,1)end{bmatrix}$$
$$h_2=begin{bmatrix}(-1,0)\(0,3)\(1,1)end{bmatrix}$$
$$h_1-h_2=begin{bmatrix}(-1,0)\(0,0)\(1,0)end{bmatrix}$$
$$f_1-f_2=[0,-1,0,1]$$
$$h_{1-2}=begin{bmatrix}(-1,1)\(0,2)\(1,1)end{bmatrix}$$
In general, if two images are different from each other but have the same histogram, then the histogram of the difference of the images will not be equal to the difference of the histograms.
Have I misunderstood something? I don't know if there's even a rigorous idea of "histogram subtraction".
$endgroup$
add a comment |
$begingroup$
Consider one-dimensional images
$$f_1=[0,0,0,1]$$
$$f_2=[0,1,0,0]$$
Then we can say that
$$h_1=begin{bmatrix}(-1,0)\(0,3)\(1,1)end{bmatrix}$$
$$h_2=begin{bmatrix}(-1,0)\(0,3)\(1,1)end{bmatrix}$$
$$h_1-h_2=begin{bmatrix}(-1,0)\(0,0)\(1,0)end{bmatrix}$$
$$f_1-f_2=[0,-1,0,1]$$
$$h_{1-2}=begin{bmatrix}(-1,1)\(0,2)\(1,1)end{bmatrix}$$
In general, if two images are different from each other but have the same histogram, then the histogram of the difference of the images will not be equal to the difference of the histograms.
Have I misunderstood something? I don't know if there's even a rigorous idea of "histogram subtraction".
$endgroup$
Consider one-dimensional images
$$f_1=[0,0,0,1]$$
$$f_2=[0,1,0,0]$$
Then we can say that
$$h_1=begin{bmatrix}(-1,0)\(0,3)\(1,1)end{bmatrix}$$
$$h_2=begin{bmatrix}(-1,0)\(0,3)\(1,1)end{bmatrix}$$
$$h_1-h_2=begin{bmatrix}(-1,0)\(0,0)\(1,0)end{bmatrix}$$
$$f_1-f_2=[0,-1,0,1]$$
$$h_{1-2}=begin{bmatrix}(-1,1)\(0,2)\(1,1)end{bmatrix}$$
In general, if two images are different from each other but have the same histogram, then the histogram of the difference of the images will not be equal to the difference of the histograms.
Have I misunderstood something? I don't know if there's even a rigorous idea of "histogram subtraction".
answered Jan 17 at 20:18
ShapeOfMatterShapeOfMatter
1794
1794
add a comment |
add a comment |
$begingroup$
No, the difference of histograms of images is not equal to the histogram of difference of images.
Consider the following counter example:
$f_1$ image of dimensions $1 times 1$ with $f_1(0,0) = 0$,
$f_2$ image of dimensions $1 times 1$ with $f_2(0,0) = 1$.
Define $f_d(0,0) = f_1(0,0) - f_2(0,0) = 0 - 1 = -1$. Now take the histograms:
- $h[f_1](x) = begin{cases} 0 & text{for } x = 1,\
1 & text{for } x = 0,\
0 & text{for } x = -1,
end{cases}$ - $h[f_2](x) = begin{cases} 1 & text{for } x = 1,\
0 & text{for } x = 0,\
0 & text{for } x = -1,
end{cases}$ - $h[f_1 - f_2](x) = begin{cases} 0 & text{for } x = 1,\
0 & text{for } x = 0,\
1 & text{for } x = -1.
end{cases}$
The histogram difference results to be
- $(h[f_1] - h[f_2])(x) = begin{cases} -1 & text{for } x = 1,\
1 & text{for } x = 0,\
0 & text{for } x = -1.
end{cases}$
Hence we deduce that the histogram operator is not linear:
$$ h[f_1 - f_2] neq h[f_1] - h[f_2].$$
$endgroup$
add a comment |
$begingroup$
No, the difference of histograms of images is not equal to the histogram of difference of images.
Consider the following counter example:
$f_1$ image of dimensions $1 times 1$ with $f_1(0,0) = 0$,
$f_2$ image of dimensions $1 times 1$ with $f_2(0,0) = 1$.
Define $f_d(0,0) = f_1(0,0) - f_2(0,0) = 0 - 1 = -1$. Now take the histograms:
- $h[f_1](x) = begin{cases} 0 & text{for } x = 1,\
1 & text{for } x = 0,\
0 & text{for } x = -1,
end{cases}$ - $h[f_2](x) = begin{cases} 1 & text{for } x = 1,\
0 & text{for } x = 0,\
0 & text{for } x = -1,
end{cases}$ - $h[f_1 - f_2](x) = begin{cases} 0 & text{for } x = 1,\
0 & text{for } x = 0,\
1 & text{for } x = -1.
end{cases}$
The histogram difference results to be
- $(h[f_1] - h[f_2])(x) = begin{cases} -1 & text{for } x = 1,\
1 & text{for } x = 0,\
0 & text{for } x = -1.
end{cases}$
Hence we deduce that the histogram operator is not linear:
$$ h[f_1 - f_2] neq h[f_1] - h[f_2].$$
$endgroup$
add a comment |
$begingroup$
No, the difference of histograms of images is not equal to the histogram of difference of images.
Consider the following counter example:
$f_1$ image of dimensions $1 times 1$ with $f_1(0,0) = 0$,
$f_2$ image of dimensions $1 times 1$ with $f_2(0,0) = 1$.
Define $f_d(0,0) = f_1(0,0) - f_2(0,0) = 0 - 1 = -1$. Now take the histograms:
- $h[f_1](x) = begin{cases} 0 & text{for } x = 1,\
1 & text{for } x = 0,\
0 & text{for } x = -1,
end{cases}$ - $h[f_2](x) = begin{cases} 1 & text{for } x = 1,\
0 & text{for } x = 0,\
0 & text{for } x = -1,
end{cases}$ - $h[f_1 - f_2](x) = begin{cases} 0 & text{for } x = 1,\
0 & text{for } x = 0,\
1 & text{for } x = -1.
end{cases}$
The histogram difference results to be
- $(h[f_1] - h[f_2])(x) = begin{cases} -1 & text{for } x = 1,\
1 & text{for } x = 0,\
0 & text{for } x = -1.
end{cases}$
Hence we deduce that the histogram operator is not linear:
$$ h[f_1 - f_2] neq h[f_1] - h[f_2].$$
$endgroup$
No, the difference of histograms of images is not equal to the histogram of difference of images.
Consider the following counter example:
$f_1$ image of dimensions $1 times 1$ with $f_1(0,0) = 0$,
$f_2$ image of dimensions $1 times 1$ with $f_2(0,0) = 1$.
Define $f_d(0,0) = f_1(0,0) - f_2(0,0) = 0 - 1 = -1$. Now take the histograms:
- $h[f_1](x) = begin{cases} 0 & text{for } x = 1,\
1 & text{for } x = 0,\
0 & text{for } x = -1,
end{cases}$ - $h[f_2](x) = begin{cases} 1 & text{for } x = 1,\
0 & text{for } x = 0,\
0 & text{for } x = -1,
end{cases}$ - $h[f_1 - f_2](x) = begin{cases} 0 & text{for } x = 1,\
0 & text{for } x = 0,\
1 & text{for } x = -1.
end{cases}$
The histogram difference results to be
- $(h[f_1] - h[f_2])(x) = begin{cases} -1 & text{for } x = 1,\
1 & text{for } x = 0,\
0 & text{for } x = -1.
end{cases}$
Hence we deduce that the histogram operator is not linear:
$$ h[f_1 - f_2] neq h[f_1] - h[f_2].$$
answered Feb 15 at 21:26
simonetsimonet
1668
1668
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3077434%2fis-histogram-function-linear%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown