- bb0t: Gyilkos szénhidrátok, avagy hogyan fogytam önsanyargatás nélkül 16 kg-ot
- Mr Dini: Hálózati problémából kiber-versenyfeladat!
- Luck Dragon: Asszociációs játék. :)
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- D1Rect: Nagy "hülyétkapokazapróktól" topik
-
IT café
TOPIK ÖSSZEFOGLALÓ
Kérlek, kérdezés előtt olvasd el!
Új hozzászólás Aktív témák
-
lakisoft
veterán
válasz lakisoft #15436 üzenetére
Mert van egy ilyen megoldás:
[link]:
All image processing packages should make this easy. I'll show you how to do it in Mathematica, if you have access to this system. Mathematica is a programming language, but it's really easy to do these kinds of manipulations, so if you have access to it (e.g. through a university site license), I recommend you give it a go!First, import the image:
img = Import["http://farm1.staticflickr.com/62/171463865_36ee36f70e.jpg"]
Recompress it using JPEG compression
img2 = ImportString@ExportString[img, "JPEG", "CompressionLevel" -> 0.35]
Now take the difference of pixel values, converting them first to floating point numbers to ensure that negative values are preserved.
diff = ImageSubtract[Image[img, "Real"], Image[img2, "Real"]]
Not much is visible on the difference image (the difference is tiny), and negative values are clipped to black. So let's rescale all values to fill the whole dynamic range (the minimum will be scaled to 0, the maximum to 1):
ImageAdjust[diff]
ImageDifference gives the absolute difference of the two images, and produces no negative numbers. This is the operation you are more likely to find in image processing packages, especially GUI ones (Photoshop, GIMP).
ImageDifference[img, img2]
We can also take a single RGB channel, for example the red one, and visualize the positive and negative differences using 'opposing' colours:
ArrayPlot[0.5 + ImageData[First@ColorSeparate[diff, "Red"]],
ColorFunction -> "RedGreenSplit", ColorFunctionScaling -> False]Here's the same thing, with the differences amplified 5 times. The JPEG artefacts are more recognizable now.
ArrayPlot[0.5 + 5 ImageData[First@ColorSeparate[diff, "Red"]],
ColorFunction -> "RedGreenSplit", ColorFunctionScaling -> False]The advantage of using a programming language is that we can easily automate this and see how the difference changes for "compression levels" between 0.1 and 1.0:
Grid@Partition[Table[
ArrayPlot[
0.5 + ImageData[
First@ColorSeparate[
ImageSubtract[Image[img, "Real"],
Image[ImportString@
ExportString[img, "JPEG", "CompressionLevel" -> c],
"Real"]], "Red"]], ColorFunction -> "RedGreenSplit",
ColorFunctionScaling -> False],
{c, 0.1, 1, 0.1}
], 5]Azt hiszem egyszerűbben is meglehet mondani, 2 képről hogy azonos-e van nem.
-
lakisoft
veterán
válasz lakisoft #15437 üzenetére
És találtam egy ilyet is: [link]:
Yes, the difference mode is the way to do this, keeping Jeff's point in mind. In film/video, this technique is called a "Difference Matte," and it's not widely used, because it usually doesn't work all that well. However, if you still want to try it, here's what to do:
1) Open the no-vase image and press F7 to bring up the Layers Palette.
2) Open the vase image and, holding down SHIFT, use the Move Tool to drag it into the no-vase image (the SHIFT key will ensure that the vase image is centered).
3) The vase image should now be the upper layer in the no-vase document. Change it's blend move (at the top of the layers palette) from Normal to Difference.
This will make everything turn black EXCEPT for whatever is different in the two images -- i.e. the vase.
4) With the magic wand tool, click any black pixel. All the black pixels will become selected.
3) From the menu, choose Select > Inverse. Now just the vase will be selected.
4) Press Command+J (PC: Control+J) to copy the selected vase to a new layer.
5) Set this layer's mode to Normal.
6) Drag the middle layer (the original vase layer) to the trash.
Hint: Learn how to use Quick Masks. They will help you deal with the problem that Jeff mentioned. -
BonFire
veterán
válasz lakisoft #15438 üzenetére
Túlbonyolítod. A két képet egymásra teszed (két külön rétegként), és a felső összhatásmódját Difference-re állítod. Itt ki fognak bukni a különbségek. Akkor is, ha csak tömörítési minőségbeli különbségek vannak. Egy 80-as kép szebb, mint egy 60-as, a kisebb értékű pixelesebb, cakkosabb. Ezek a különbségek is előbukkannak Difference összhatásmódban.
A Prohardveren nem olvasok privátot! Csak topikban vagy a publikus e-mailemen adok tanácsot.
Új hozzászólás Aktív témák
- Bontatlan - BATTLEFIELD 1 Collectors Edition - Játékszoftver nélkül
- Windows, Office licencek a legolcsóbban, egyenesen a Microsoft-tól - 2990 Ft-tól!
- Windows 10/11 Home/Pro , Office OEM/Retail kulcsok
- Vírusirtó, Antivirus VPN kulcsok
- AKCIÓ! - STEAM kulcsok /Anuchard, Aragami, Children of Morta, stb. - 2024.04.17.
- Windows 10, 11 Professional, Home, Enterprise licenckulcsok 64, 32 bit - MEGA Akció!
- Windows Server 2016, 2019, 2022 Standard, Datacenter, Essentials termékkulcsok - MEGA akció!
- Vírusirtó, Antivirus, VPN licenckulcsok - kedvezményes ajánlatok (frissítve: 2024. 05. 01.)
- Office Professional Plus 2013, 2016, 2019, 2021 RETAIL licenckulcsok - MEGA Akció!
- Windows 7 Home Premium, Pro, Ultimate és Windows 8, 8.1 Pro licenckulcsok 64, 32 bit - MEGA Akció!
Állásajánlatok
Cég: Promenade Publishing House Kft.
Város: Budapest
Cég: Ozeki Kft.
Város: Debrecen