Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two-Up: The Killer Feature #2

Open
alanhogan opened this issue Mar 9, 2017 · 1 comment
Open

Two-Up: The Killer Feature #2

alanhogan opened this issue Mar 9, 2017 · 1 comment

Comments

@alanhogan
Copy link
Collaborator

alanhogan commented Mar 9, 2017

Look at these two screen shots:

Screen shot A, showing tabs in an interface

Screen shot B (like A but with a different tab selected and a different crop)

Clearly they are “of” the same thing, but in a different state. There is a comparison to be made here. (In this case, I want to animate between these screen shots.) Since I’m human, they are cropped differently.

Ideally I could provide these two images to a goat, and the goat would baaaaah at me and then return the images to me cropped such that the pixels that haven't changed line up exactly. (I might want to crop a little further, within the boundaries of this overlapping space.)

And then I could annotate both images at once, with my annotations appearing in the right place on both images.

Were I to do this without the help of a friendly ruminant, I would open up an image editor (like Acorn) and layer both images on top of each other, temporarily changing blending mode and/or opacity to line up what I wanted lined up:

zendesk tabs fun fest - two-up for greg

Then I’d crop, reset the blending/opacity, add an annotation layer, and export both layers as separate images.

That’s how I made this GIF:

contrast changes github 2017-03-02

Now something interesting you can see in my two-up (shown again below) is that there are fewer meaningful identical pixels in the image than I thought there would be.

zendesk tabs fun fest - two-up for greg

I’m thinking about how a digital simulation of our hypothetical friendly cloven-hoofed friend would go about this.

I think it's more than maximizing unchanged pixels.

It’s probably more about maximizing unchanged edges.

Edge detection is too much for Acorn.

Let me try Photoshop…

Adobe blowing wind

time passes… nothing happens…

OK, no.

Bye, Adobe

How about a free web page instead. Wonderful.. Here’s the result of a 3x3-convolution Laplatian edge detection algorithm:

One result
and
next result

Cool 😎

Here’s what happens when we run difference on the two images overlapped naïvely at the origin, that is, both with top-left points at (0, 0).
zendesk tabs fun fest - edge detect - two-up for greg - origin

Note that black means there is no difference.

Here is the sweet spot:
zendesk tabs fun fest - edge detect - two-up for greg - aligned

Note that the entire top line of text and avatar have 'disappeared'.

Overall I would expect the result to be 'blackest' when things are the 'most lined up' but that may still be too naïve. Maybe we have to exploit the fact that a whole region just went black, and we want to maximize the overall calmness / solid black-ness of the image? All guesswork.

It may be necessary to allow the user to align the images themselves (especially in pathological cases).

I can think of two different UIs for this.

One is asking the user to point out an 'anchor point' (zoomed in for pixel precision) on each image. I might choose:

ANCHOR POINT LOCATED

Maybe the UI could look something like this:

example interface 1

Let me explain:

example interface 1 copy annotated

Alternatively, the interface could be just the top panel, but you drag the top layer (image B) around (and/or use arrow keys to nudge) so you can find the perfect alignment. Your 'canvas' is image A. Whatever intersects of images A and B once B is placed, that determines your crop area & alignment.

Also, sometimes I want a GIF that just flips from one to the next every 1sec, and sometimes I might want two-up output.

@gregziegan
Copy link
Owner

Once I finish resizing and clean up the movement state code, this'll be the first new feature I look into!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants