
Apply dog vision to photo of Robert S. McNamara - vinnyglennon
http://www.wolframalpha.com/input/?i=apply+dog+vision+to+photo+of+Robert+S.+McNamara
======
w1ntermute
This sums up the new Wolfram Language in one command - ways of combining data
and algorithms in novel/interesting, but practically useless ways.

~~~
Aardwolf
I tried replacing dog by cat, and it doesn't work. Why?

Also, for the inverse gamma function of complex numbers: gamma^-1(1+10i)
works. gamma^-1(1-10i) confuses its parser (doesn't know how to interpret
input, even though the previous and next one work). gamma^-1(1-10.0i) works
again. Why?

~~~
eternalban
Cat worked for me.

~~~
Aardwolf
I tried again, and still doesn't work, it says: Using closest Wolfram|Alpha
interpretation: photo of Robert S. McNamara (so it ignores the "cat" part. the
fact that the image it shows has a strange yellow color is a coincidence)

------
taliesinb
Fill in anyone you want:

[https://www.wolframcloud.com/objects/032f062e-5a63-4e3a-aff4...](https://www.wolframcloud.com/objects/032f062e-5a63-4e3a-aff4-019383ee940d)

Corresponding code:

    
    
      DogVision[img : (_Image | _Graphics | _Graphics3D)] := 
        Module[{rgbimg = ColorConvert[img, "RGB"], data}, 
         data = Transpose[ImageData[rgbimg], {3, 2, 1}];
         GaussianFilter[
          Image[Transpose[{(data[[1]] + data[[2]])/
              2, (data[[1]] + data[[2]])/2, data[[3]]}, {3, 2, 1}]], 5]];
    
      CloudDeploy[
       FormFunction[{"person" -> "Person"}, 
        DogVision[EntityValue[#person, "Image"]] &, "JPEG"], 
        Permissions -> "Public"]

~~~
hamburglar
Every time I play around with Wolfram Alpha, I get frustrated trying to figure
out how I get past the natural language input interpretation and write code
like you specify here. Is this a restricted feature for pro subscribers? Why
do they bother letting me see the "input interpretation" (and provide it as
copyable plaintext) if they're not going to let me actually use it?

~~~
taliesinb
It sounds like you want to use the Wolfram Language rather than Wolfram Alpha.

~~~
hamburglar
I believe what I want is the ability to use Wolfram Alpha by writing my
queries in the Wolfram Language. How does one do that?

~~~
hnriot
That's exactly what the Wolfram language does. You cloud deploy your code to
use it from the web if you want it to be a service, like REST

~~~
hamburglar
Let me be super explicit. Given: I have a piece of Wolfram Language code.
Where do I enter it to get it evaluated? Assume I know nothing.

I can't tell if the answer is: A) there's a text box on the web site you are
apparently overlooking you moron, B) you buy/download the software, save your
code in a text file, and run it using software on your local machine, C) you
sign up for Wolfram Alpha Pro Deluxe which then makes the query input box on
the Wolfram Alpha page start accepting Wolfram Language, or D) none of the
above: [fill in the blank]

~~~
taliesinb
You will _soon_ be able to use any of the cloud products mentioned on
[http://www.wolframcloud.com/](http://www.wolframcloud.com/).

There will also be Wolfram Desktop, the local IDE for the Wolfram Language
that comes with our online products, as well as Mathematica 10, a non-cloud-
enabled instantiation of the language for the academic market.

If you want notification as soon as we go public, sign up on
[http://www.wolfram.com/programming-
cloud/](http://www.wolfram.com/programming-cloud/).

Disclosure: I deployed this code from my own copy of a prerelease version of
Wolfram Desktop, which I could do because I'm an employee.

P.S. Your idea of being able to write Wolfram Language code straight into
Alpha and have it execute is an interesting one. You can do some basic stuff
like
[http://www.wolframalpha.com/input/?i=Table[i^2%2C+{i%2C+1%2C...](http://www.wolframalpha.com/input/?i=Table\[i^2%2C+{i%2C+1%2C+10})]
already, but I agree we should allow you to execute anything (safe) using
Alpha.

~~~
hamburglar
> P.S. Your idea of being able to write Wolfram Language code straight into
> Alpha and have it execute is an interesting one.

It's really shocking to me that this idea might be new. To anyone. As an end
user, the "input interpretation" box sends a very clear (but apparently wrong)
message: "you entered a for-dummies query, which would have looked like [this]
in advanced mode." I am pretty sure that _every single time_ I've looked at a
Wolfram Alpha result page, I've spent a significant amount of time searching
in vain for the way to uncover that advanced mode. It is so absurdly obvious
that it must be hidden in there somewhere, because otherwise, what purpose
could showing me the raw Wolfram Language text possibly serve? It can only
ever be run in an environment that I don't have access to! Alas, there
apparently has been no purpose all this time.

~~~
nl
I'm working on an open source knowledge engine thing roughly similar to
WolframAlpha.

I'm pretty interested in the types of things you might like to do in your
"advanced mode".

I've begun work on a SymPy part of it for the math parts, but one of the first
things I realised was that it might make sense to expose the "knowledge base"
itself to python.

~~~
hamburglar
> I'm pretty interested in the types of things you might like to do in your
> "advanced mode".

"Advanced mode" in this context simply means "I want to write an expression in
a formal language because it lets me remove the difficult-to-control natural
language parsing." It's actually a simpler mode, because it does less, but it
requires the user to use a programming language, which is generally considered
"advanced" on this type of user interface.

------
ForHackernews
This stuff is what really irritates me about Wolfram Alpha. Almost everything
they do beyond basic unit conversion comes across as a nifty parlor trick
instead of a real capability.

Like you see this example, and think "Oh, it can apply different types of
animal vision to different types of images." so you try this:

[http://www.wolframalpha.com/input/?i=apply+cat+vision+to+pho...](http://www.wolframalpha.com/input/?i=apply+cat+vision+to+photo+of+a+small+dog)

And you get:

> Input interpretation: Canis Minor | constellation region

With a diagram of the constellation Canis Minor...which I guess is SORT of a
small dog.

But this kind of stuff is rife throughout Wolfram Alpha, and makes it much
much less useful than Google. For example, here's a question I was curious
about recently:
[http://www.wolframalpha.com/input/?i=world+energy+use+per+ye...](http://www.wolframalpha.com/input/?i=world+energy+use+per+year+compared+to+solar+incidence)

Wolfram just totally ignores the second part of the query, versus Google[0],
which gives this very on-topic result for the third result:
[http://www.sandia.gov/~jytsao/Solar%20FAQs.pdf‎](http://www.sandia.gov/~jytsao/Solar%20FAQs.pdf‎)

[0]
[https://encrypted.google.com/search?hl=en&q=world%20energy%2...](https://encrypted.google.com/search?hl=en&q=world%20energy%20use%20per%20year%20as%20percentage%20of%20solar%20output#hl=en&q=world+energy+use+per+year+compared+to+solar+incidence)

------
taliesinb
The Edges of The Edge:

[http://www.wolframalpha.com/share/clip?f=d41d8cd98f00b204e98...](http://www.wolframalpha.com/share/clip?f=d41d8cd98f00b204e9800998ecf8427er0uv7vb6lk)

~~~
kennywinker
The Boss Embossed:

[http://www.wolframalpha.com/input/?i=apply+embossing+effect+...](http://www.wolframalpha.com/input/?i=apply+embossing+effect+to+image+of+bruce+springsteen)

~~~
leoc
I was sure it would be
[http://www.wolframalpha.com/input/?i=apply+embossing+effect+...](http://www.wolframalpha.com/input/?i=apply+embossing+effect+to+image+of+stephen+wolfram)

------
ams6110
Had no idea that dogs' visual acuity was so poor. My dog seems to be able to
spot squirrels at 100 yards...

~~~
yan
From what I understand, both dogs and cats have poor "static" vision but can
spot minute changes very, very well. A squirrel has a very specific gait and
movement style which they can spot very well. If your dog saw a photo of a
squirrel from 100yrds away, I doubt it would heed much attention to it.

~~~
sanoli
My dog can also spot food on the cement sidewalk from far away, too far to be
just the smell.

------
mstromb
Replacing "dog" with "cat" does not work... though the resulting
interpretation ("photo of Robert S. McNamara") is oddly yellowed.

~~~
Tarrosion
I tried exactly the same thing. I always find WolframAlpha frustrating for
anything except arithmetic. Example: search "sat scores" and you get some info
about SAT scores, including a histogram by gender. Search "sat scores male"
and the query is not understood, and you get the page for SAT scores. Search
"sat scores of males" and the query is not understood, and you get the page
for "sat male", i.e. a page describing an infant born tomorrow.

~~~
vacri
It's reminiscent of the old text adventures, where the easy part was figuring
out what to do, and the hard part was figuring out the right syntax to match
the coder's expectations.

------
cvs268
No wonder cats and dogs don't get along very well...

[http://www.wolframalpha.com/input/?i=apply+dog+vision+to+pho...](http://www.wolframalpha.com/input/?i=apply+dog+vision+to+photo+of+a+cat)

------
briholt
Inverted color
[http://www.wolframalpha.com/input/?i=invert+photo+of+Robert+...](http://www.wolframalpha.com/input/?i=invert+photo+of+Robert+S.+McNamara)

Upsidedown
[http://www.wolframalpha.com/input/?i=flip+photo+of+Robert+S....](http://www.wolframalpha.com/input/?i=flip+photo+of+Robert+S.+McNamara)

Black and white
[http://www.wolframalpha.com/input/?i=grayscale+photo+of+Robe...](http://www.wolframalpha.com/input/?i=grayscale+photo+of+Robert+S.+McNamara)

------
sailfast
Fog of war?

All kidding aside it's interesting to know that the language can perform these
kinds of transformations but I'm not quite sure what my use case would be yet.

~~~
taliesinb
Whenever it gets radically easier to do higher-level things, it usually takes
a while for people to understand the possibilities.

We haven't released our cloud platform yet, but if there are particular
domains you are interested in, you can poke around
[http://reference.wolfram.com/language/](http://reference.wolfram.com/language/)
to see what we have there. The examples to do with machine learning seems to
be popular on
[http://www.wolfram.com/language/gallery/](http://www.wolfram.com/language/gallery/).

~~~
hengheng
Then teach me. I have no idea what to expect from Alpha, and I've so far only
used it as a novelty item or advanced calculator. You can't expect me to
'naturally' speak a new language if you never reveal its vocabulary or
grammar. And I can't learn the language intuitively as long as I can't hear it
spoken anywhere either.

------
kennywinker
"apply color blindness to photo of ron howard" is also a valid query

~~~
cynwoody
So I tried "apply color blindness to photo of jonti roos" but got no useful
results. However, "apply color blindness to
[http://assets.nydailynews.com/polopoly_fs/1.1717717.13945547...](http://assets.nydailynews.com/polopoly_fs/1.1717717.1394554759!/img/httpImage/image.jpg_gen/derivatives/landscape_635/cockpit12n-1-web.jpg")
worked.

Original:
[http://assets.nydailynews.com/polopoly_fs/1.1717717.13945547...](http://assets.nydailynews.com/polopoly_fs/1.1717717.1394554759!/img/httpImage/image.jpg_gen/derivatives/landscape_635/cockpit12n-1-web.jpg)

------
CmonDev
"Apply mantis shrimp vision" would be more impressive.

------
NicoJuicy
But this doesn't work ?

"apply cat vision to photo of obama"

~~~
leoc
Cat vision isn't implemented it seems.

------
ttty
But this doesn't work: "apply dog vision to a photo of some guy"
[http://www.wolframalpha.com/input/?i=apply+dog+vision+to+a+p...](http://www.wolframalpha.com/input/?i=apply+dog+vision+to+a+photo+of+some+guy)

~~~
AutoCorrect
[http://www.wolframalpha.com/input/?i=apply+dog+vision+to+pho...](http://www.wolframalpha.com/input/?i=apply+dog+vision+to+photo+of+Carla+Gugina)

------
AutoCorrect
I like this one better:

[http://www.wolframalpha.com/input/?i=apply+dog+vision+to+pho...](http://www.wolframalpha.com/input/?i=apply+dog+vision+to+photo+of+Carla+Gugina)

------
nmeofthestate
"Wolfram, could I see a hat wobble and a flarhgunnstow?"

"Yes Paul"

~~~
alexose
We have important work to do.

------
ttty
"apply dog vision to a photo of a Michael Jackson" really interesting! lol
[http://www.wolframalpha.com/input/?i=apply+dog+vision+to+a+p...](http://www.wolframalpha.com/input/?i=apply+dog+vision+to+a+photo+of+a+Michael+Jackson)

------
userbinator
_Woof_ ram Alpha.

------
mberning
I highly doubt that 20% is uniform across all breeds.

~~~
mantrax
That's the problem with studying animals, they can't defend themselves to
correct our hilarious over-generalizations and misrepresentations of their
species.

~~~
mberning
I did a little research on how they determine the visual acuity of dogs.
Apparently it is done by training the dog to respond to lines on a background
in order to receive a treat. Once the lines become so small that the dog no
longer responds they have arrived at their answer.

What strikes me as odd is that they have taken a test designed for humans and
modified it to be used for dogs. One issue with this is the fact that when a
person takes a vision test they are trying very hard to discern the correct
letter. Anybody who has gone thorough one of these tests will know what I am
talking about. At some point you get to a letter size where you will spend
considerable effort scrutinizing it. Is it a 'C' or a 'G'?

It seems to me that you should probably design a test for dogs that brings out
a similar level of effort.

------
aheilbut
fixed it:
[http://www.wolframalpha.com/input/?i=apply+dog+vision+to+pho...](http://www.wolframalpha.com/input/?i=apply+dog+vision+to+photo+of+natalie+portman)

------
mantrax
You shouldn't trust that interpretation by Wolfram Alpha.

1\. _Distance_. One obvious discrepancy is that the closer you look at the
photo the less detailed it'll look. That's the opposite of how actual "vision"
works. Even in dogs. You need to know how far away you should look at the
photo, at what DPI screen in order for it to be even remotely representative
for what it "feels" like for a dog to see.

2\. _Original image dpi_. The second flaw is that if that image was a 600 dpi
photo McNamara processed through the same filter, it wouldn't have lost nearly
as much information percentage-wise, as a small image would.

3\. _What is "human vision"?_ The original image doesn't represent "human
vision". It's a photo captured by a camera, resampled to a specific (small)
resolution. Wolfram Alpha can't know how typical human vision "dpi" applies to
that particular photo, because it needs to know a lot of information about the
camera lens and sensor, which it doesn't know. So it can't approximate the dog
version out of it by using relative human-to-dog metrics.

I love Wolfram & all their products.

However, sorry, but that "dog vision" image is not scientific. It's just
bullshit.

~~~
JoeAltmaier
Harsh! The 2 color receptor part is accurate. And given that both photos are
on your screen, and one is 20% less acute than the other, the approximation is
fair.

------
notastartup
Is there a political message here? How McNamara is viewed by a dog. Does the
dog represent soldiers of Vietnam? ex. dog tag. If so, does the lack of
clarity show the failing of McNamara in the Vietnam war?

~~~
biot
Sometimes a cigar is just a cigar.

~~~
notastartup
like the one that almost blew up Castro

