Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Differences image

85 views
Skip to first unread message

Едуард Зозуля

unread,
Dec 6, 2017, 12:40:56 PM12/6/17
to
Hi !

What can use to get an image of the differences between two jpeg images ?

Christian Gollwitzer

unread,
Dec 6, 2017, 12:54:58 PM12/6/17
to
Am 06.12.17 um 18:40 schrieb Едуард Зозуля:
> What can use to get an image of the differences between two jpeg images ?
>
You mean, you want the pixel-by-pixel difference of an image? Or
metadata? For the pixel difference, you could do it in VecTcl:

package require vectcl
package require vectcl::tk

namespace import vectcl::*

set img1 [image create ...]
set img2 [image create ...]

# convert them into VecTcl buffers
set arr1 [numarray::fromPhoto $img1]
set arr2 [numarray::fromPhoto $img2]

# compute difference, or any other operation you like
vexpr { diff = arr1 - arr2 }

# hm - now what? Maybe display the result as another image
set img3 [image create photo]
numarray::toPhoto $diff img3

# display on a canvas
canvas create image 0 0 -anchor nw -image $img3

Beware that I haven't tested it. Might need to fix some syntax errors
For something that works 100%, take a look at the demo script

https://github.com/auriocus/VecTcl/blob/master/TkBridge/testrun.tcl

The commands convert Truecolor images from/to 3D arrays with x,y,channel
ordering of the indices and normalized intensity (0..1).

Another thing might be crimp from Andreas Kupries.

Christian

Едуард Зозуля

unread,
Dec 7, 2017, 7:30:44 AM12/7/17
to
среда, 6 декабря 2017 г., 19:54:58 UTC+2 пользователь Christian Gollwitzer написал:
Wow, thank you. Brilliant.

keithv

unread,
Dec 8, 2017, 8:52:59 PM12/8/17
to
On Wednesday, December 6, 2017 at 9:40:56 AM UTC-8, Едуард Зозуля wrote:
> Hi !
>
> What can use to get an image of the differences between two jpeg images ?

Check out http://wiki.tcl.tk/44064 which lets you visually compare two images.

Keith
0 new messages