David Hubel, right, pours a glass of customary victory champagne for fellow Harvard Medical School researcher Torsten Wiesel as associates look on Friday October 10, 1981. The celebration was for the announcement that the two were co-winners along with Roger Sperry of the California Institute of Technology of the Nobel Prize in Medicine. (Associated Press)

David H. Hubel, a Nobel Prize-winning neuroscientist whose astonishing map of the visual cortex pulled back the curtain on one of the brain’s most mysterious functions, the power of sight, died Sept. 22 in Lincoln, Mass. He was 87.

The cause was kidney failure, said his son Paul Hubel.

Starting in the late 1950s, Dr. Hubel’s research revealed the architecture of the visual cortex, the region of the brain that receives floods of data gathered by the eyes.

Together with Swedish neurophysiologist Torsten N. Wiesel, he discovered how nerve cells — neurons — analyze the light rays that hit our retinas, bit by bit, to assemble the detailed, moving and almost infinitely diverse final images that we perceive as our external world.

Over 25 years of work together, the men revealed that the cortex is arranged in vertical columns of cells, each module devoted to process a different constituent of the seen world: form, contour, color, movement and ­three-dimensionality.

For their collaboration, begun at Johns Hopkins University and carried out for the next two decades at Harvard Medical School, Dr. Hubel and Wiesel won the 1981 Nobel Prize in Physiology or Medicine. They shared the prize with Roger W. Sperry, then affiliated with the California Institute of Technology.

When the men began studying the visual system, little was known about the functional organization of the cerebral cortex, and scientists had only recently begun recording electrical impulses from that highest and most complex area of the brain. The Nobel Prize committee cited the two men’s research as having “disclosed one of the most well guarded secrets of the brain: the way by which its cells decode the message which the brain receives from the eyes.”

In their first experiments together in 1958, Dr. Hubel and Wiesel, an inquisitive and often mischievous pair, crammed a projector inside their 15-by-15-foot laboratory at Johns Hopkins and sat their research cats, adorned in electrical headgear, before a screen.

They displayed spots of all sizes before the animals — dark spots on bright backgrounds and bright spots on dark — trying to find a stimulus that could coax a single neuron, wired to a surgically implanted electrode, to fire.

For the first several days, they got no response. Desperate, they danced in front of the cats, waving their arms. At one point, mostly as a joke, they presented the cats with pictures of beautiful women in magazine advertisements.

In the scientists’ 2004 co-memoir, “Brain and Visual Perception: The Story of a 25-Year Collaboration,” they said that “our room must have seemed like a circus, complete with a tent and exotic animals.”

It was a shadow created when Dr. Hubel and Wiesel were re­arranging their equipment — a faint line that swept across the projector screen in one specific orientation — that made a cat neuron fire. It was a serendipitous first step in a career-long journey of understanding the visual system.

Dr. Hubel recalled that, upon discovery, they studied this first cat neuron for nine hours straight. Their seminal 1959 publication of these findings, they wrote, “of course gives no hint of our struggle. As usual in science reports we presented the bare results, with little of the sense of excitement or fun.”

Other lines of Dr. Hubel and Wiesel’s work led to the discovery that visual cells begin developing immediately after birth and degenerate quickly if they aren’t used. That finding led to a change in the established protocol of delaying operations to correct visual impairments in children.

David Hunter Hubel was born Feb. 27, 1926, in Windsor, Ontario, to American parents and raised in Montreal. His father was a chemical engineer, and the younger Hubel developed an interest in science as a child.

He used his chemistry set to fire toy cannons, built radios and sent off hydrogen balloons into the Canadian countryside with attached notes, one of which, he recalled, “brought an answer, after many months, in French, from a farmer’s daughter 100 miles away.”

At McGill University in Montreal, he graduated with honors in mathematics and physics in 1947. Though accepted to graduate school for physics, he applied to McGill’s medical school on a whim. He recalled years later in the memoir that “to my horror I was accepted there, too.”

He enrolled having taken only one biology class, a summer course on invertebrate zoology and botany, and graduated in 1951. During his medical internship, Dr. Hubel met his future wife, Ruth Izzard, at the university choral society, where they sang together. They married in 1953.

His wife died in February. Survivors include three sons, Carl Hubel of Pittsburgh, Eric Hubel of Brooklyn and Paul Hubel of Mountain View, Calif.; and four grandchildren.

After serving in the Army in the mid-1950s, Dr. Hubel joined Johns Hopkins to continue research with Vernon Mountcastle, one of the leading neurophysiologists of the era.

He discovered upon arrival, however, that Mountcastle’s lab was undergoing a six-month-long renovation. Stephen Kuffler, a neurophysiologist who studied vision, invited Dr. Hubel to team up with Wiesel, a young scientist who had just arrived from Sweden, to pass the time. The partnership that was slated for half a year lasted for 25.

Once, Dr. Hubel recalled, Mountcastle stopped by to check on their progress and asked how many visual cells the men had studied. Mountcastle himself had just published a paper compiling observations of some 600 neurons.

“To us, that was an astronomical number, literally,” Dr. Hubel wrote in the memoir. He answered that they were studying cells No. 3,006, 3,007 and 3,008 in their series of experiments.

“In order to catapult ourselves into a league that came close to Vernon’s we had begun our series of cells with No. 3000,” he wrote. “But we did not tell Vernon.”

Dr. Hubel and Wiesel moved with the Kuffler team to Harvard Medical School in 1959, where they formed the core of Harvard’s neurobiology department, the first of its kind in the country.

There, Dr. Hubel continued research and lecturing for the next four decades. His favorite course was his freshman seminar, which he taught for more than a decade, even after he retired.

Each year, he would accept a dozen Harvard freshmen into his lab, leading them through dissections of sheep brains, practicing surgical sutures on pieces of scrap leather and teaching them how to weld and build their own simple electronic gadgets.

Outside of academia, Dr. Hubel pursued a range of hobbies. He learned Japanese and French and studied astronomy. He was also a pianist and flutist. His interest in photography led to a friendship with Edwin H. Land, a co-founder of Polaroid.

In a 2009 address commemorating the 40th anniversary of Dr. Hubel and Wiesel’s first publication on the workings of the visual cortex, neuroscientist and Nobel laureate Eric Kandel recalled the deliberations for a lesser prize that the pair received in 1978.

A member of the award committee had commented to Kandel that Dr. Hubel and Wiesel’s research, though superb, had limited generality to human biology.

“You are right, it does not apply to the kidney or the spleen,” Kandel recalled answering. “It is much more restricted. It only helps to explain the workings of the mind.”

Botelho is a freelance writer.