Image authentication using color information
Show older comments
I am using attached script for splitting the image into 21 blocks (for Red, Green and Blue channels) and then compare each block pixel by pixel.
However, I want to do some changes as below:
1) How can I divide the image automatically into n number of equal blocks ( so I will just have to say 10 and it will divide the image into 10 equal size blocks).
2) I used isequal() function for comparison two blocks. How can I get the distance between two blocks. (Like Euclidean distance or something)
3) How to compare RGB histogram for each block. (Here I think it is possible to only compare the Y axis as X axis of the histogram will be 0 to 255 for all the blocks.) I know how to generate histogram but I dont know how to use that information for the comparison.
4) How can I keep some threshold e.g after comparison if all the blocks are matching > 98% then it is a true image OTW false image detected.
Thank you in advance.
11 Comments
Guillaume
on 3 Dec 2018
You've told us what you want to do but you haven't asked any actual question, so it's unclear what help you need.
"As isequal() was giving error for A x B x 3 block. It can only compare A x B type blocks."
isequal does not care one bit about the number of dimensions of the input. It will work just as well with an AxBx3 input as an AxB input or even an AxBxCxDxEx... input. If the two inputs don't have the same number of dimensions, isequal job is easy, the answer is false.
Devarshi Patel
on 3 Dec 2018
Guillaume
on 3 Dec 2018
How can I divide the image automatically into n number of equal blocks ( so I will just have to say 10 and it will divide the image into 10 equal size blocks)
Dividing an image into a non-prime number of blocks is easy. However, if the image size is not a multiple of the number of blocks,it's going to be difficult to divide it into blocks all the same size.
Also, if it is to be divided into 10 blocks, is it 5x2 or 2x5 blocks?
Devarshi Patel
on 3 Dec 2018
Edited: Devarshi Patel
on 3 Dec 2018
Image Analyst
on 6 Dec 2018
Why do you want to "compare" images in this way? What's the use case? Is it to test quality of compression/restoration? Forensics? Forgeries? What? If we knew what it was for we could point to the right place to find the right algorithms for that purpose.
Devarshi Patel
on 6 Dec 2018
Edited: Devarshi Patel
on 7 Dec 2018
Devarshi Patel
on 7 Dec 2018
Devarshi Patel
on 10 Dec 2018
Guillaume
on 10 Dec 2018
1) The paper you've attached is copyrighted and not open access. Can you please remove the attachment?
Devarshi Patel
on 10 Dec 2018
Devarshi Patel
on 10 Dec 2018
Edited: Devarshi Patel
on 10 Dec 2018
Accepted Answer
More Answers (2)
Image Analyst
on 7 Dec 2018
0 votes
Maybe you should just try ro register the images with imregister() and then use immse() and ssim().
Or you could also use Hu's moments
Or any of the feature matching things in the Computer Vision System Toolbox.
3 Comments
Devarshi Patel
on 7 Dec 2018
Image Analyst
on 7 Dec 2018
There are so very many things that could possibly be measured. For one, you could just compute the RGB histograms of each image. Better, why don't you look up forgery or forensics in VisionBibliography and you'll find lots of algorithms. Pick one or two and code them up:
Devarshi Patel
on 7 Dec 2018
Devarshi Patel
on 19 Dec 2018
0 votes
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!