Jerome Lemelson was dying.

A rare stomach cancer had been diagnosed in one of the nation's most prolific and perhaps greatest inventors. The disease had spread to his liver, ravaging his body and causing severe pain.

In his final days at Cedars-Sinai Medical Center in Los Angeles in 1997, the 74-year-old Lemelson couldn't eat or drink. Jaundiced and bedridden, he made no special requests. His room was the same as any other patient's.

Nor did he brag about his vast accomplishments: more than 600 patents to his credit. A fortune amassed.

As death approached, he believed his place in history had been secured, thanks to his most spectacular inventions: machine vision and the bar-code scanner, technology that has dramatically altered the way in which we live.

"He was a simple man," said his oncologist, Giora Mavligit. "A mensch."

But to his many detractors, Lemelson was something else.

They claim Lemelson's patents were, in fact, worthless. Lemelson, they say, was one of the great frauds of the 20th century.

Critics charge that, for decades, Lemelson manipulated the U.S. Patent Office, exploiting loopholes that forced 979 companies -- including Ford, Dell, Boeing, General Electric, Mitsubishi and Motorola -- to pay $1.5 billion in licensing fees.

"Anything he claims to have invented, he didn't. He's a science-fiction writer," said Robert Shillman, founder, chairman and chief executive at Cognex Corp., the world's largest maker of machine vision products and one of Lemelson's most truculent opponents.

On Christmas Eve in 1954 -- the year he married his wife, Dolly -- Lemelson filed a 150-page patent application with the U.S. Patent Office.

The patent spelled out how a robot could perform a variety of fantastic tasks during industrial production, such as riveting, welding and transport. It also showed how a robot, armed with a camera, could serve as a quality-control inspector and manage jobs that the human eye could not.

Two years later, Lemelson submitted another application expanding on the previous one.

Those two applications, Lemelson asserted, contained the genesis of machine vision and computerized automatic identification, later known as bar-code scanning -- concepts the rest of the world wouldn't come to recognize until decades later.

Lemelson never bothered to construct a model or build a company around the designs. The patent office didn't require it. The lone inventor didn't have time to take his ideas from drawing board to assembly line.

He was too busy, dreaming, doodling and reading technical journals that drove his prodigious imagination. Instead, at his various New Jersey homes, Lemelson toiled away.

Almost everything Lemelson spied had potential. Technical marvels existed everywhere. He put notion after notion onto thousands of legal pads.

Nothing seemed out of reach.

"A lot of the times the ideas that Jerry came up with were practical, and a lot of times they were impractical from a commercial point of view," said his younger brother, Howard, 80, a retired electrical engineer.

Many companies rejected his ideas, and over time the perceived snubs left Lemelson frustrated and bitter. Eventually, Lemelson came to see himself as a casualty of corporate greed.

But after many lean years, when Dolly, an interior decorator, supported the family, Lemelson found success. He licensed his automatic warehousing system to a British firm in 1964 for about $100,000, plowing the money back into his inventions and legal struggles.

In the early '70s, he sold his audiocassette drive mechanism to Sony for $2 million, and it became the basis for today's Walkman.

IBM also bought about 20 of his patents for data and word processing systems in 1981, earning him about $5 million.

The deals not only salved Lemelson's ego -- they emboldened him. They brought an air of legitimacy to his many patents, and he wanted other companies to recognize their validity.

He wanted them to pay.

By 1986, Lemelson had nearly 400 patents, and litigation was his way of enforcing them. Like Thomas Edison, he regarded a patent as a right to sue; if a company developed a product that might in some way resemble one of his patents, Lemelson would take them to court.

His family pleaded with him to ease up, to take his newfound wealth and retire.

"He couldn't just fold and let people walk all over him," said Dolly, a petite 79-year-old woman with an unshakable belief in her husband's genius. "How could he live with himself? He wanted people to respect him and respect his name."

Lemelson sought out Gerald Hosier, a maverick attorney who was quickly becoming a legend in the insulated world of patent law. Lemelson had been awarded a patent in 1962 (No. 3,016,845) for a toy and track assembly. In 1989, Hosier represented Lemelson in his lawsuit against Mattel Toys; that slender, elastic track that Hot Wheels cars zoomed along was his idea, they insisted.

Yes, the jury said. Lemelson was awarded about $71 million.

An outraged Mattel appealed. Still, Mattel was willing to pay to end the nasty dispute, and offered to settle for more than $20 million.

To everybody's disbelief, Lemelson rejected the offer.

"He felt so strongly that he had been wronged," said his son, Eric, a winemaker who lives outside Portland, Ore.

In June 1992, the appeals court issued a 3-0 decision in Mattel's favor, and the jury award -- which had ballooned to more than $80 million, thanks to post-judgment interest -- evaporated instantly.

Lemelson and Hosier walked away with nothing.

The pair were negotiating with Sony on a series of patents at the Grand Hyatt in San Francisco when word reached them.

Hosier crunched the bitter numbers.

"I wasn't exactly thrilled," he said.

Lemelson took it harder. He cried.

The U.S. Patent and Trademark Office in Alexandria is home to the more than 6.7 million patents that have been granted since 1790, when the first patent was issued for a method of making potash fertilizer.

Inside four buildings spanning 2 million square feet, approximately 3,700 patent examiners and 286 trademark attorneys handle the onerous work of vetting the applications, deciding whether an inventor's discovery entitles them to exclusive rights to it.

Patents were designed to give inventors the opportunity to raise capital and start businesses, said Bruce Lehman, who was U.S. Patent Commissioner from 1993 to 1998. At the time, a patent was supposed to be a 17-year contract with society; the inventor benefits during that span, and then his work can be used freely by society.

Lehman said Lemelson abused the system.

But the system worked for Lemelson, especially after the Process Patent Amendments Act was enacted in 1988, declaring a foreign company could no longer infringe on a patent without consequences, which included damages and a ban on U.S. sales. It also enabled Lemelson to threaten the Japanese with complex and expensive jury trials.

Lemelson believed Toyota, Nissan, Honda and Mazda, among others, were infringing on his machine-vision patents. If Hosier asserted the Lemelson patents, he might stop them from exporting their cars to the United States.

The companies signed a settlement agreement worth about $100 million.

Many in the industry denounced the settlement because it increased the exposure of U.S. automakers. They considered Lemelson and Hosier nothing more than predators.

While battling the Japanese, Hosier had also started sending form letters to hundreds of companies in 1989, accusing them of infringing Lemelson's machine vision and bar code patents. It was, said Hosier, the single-greatest patent licensing campaign by an individual in history.

Many, such as Cognex, the world's largest maker of machine vision, ignored the letters, thinking Lemelson's claims were baseless. But Hosier soon wrapped up other deals worth $350 million. Forbes declared him one of the highest-paid lawyers in the country and the American Lawyer put him on the cover.

The money didn't change Lemelson, said his son Rob. He still drove that old Mercury Marquis and wore the same ratty wool sweater.

"He was intensely frugal," the son said.

With the licensing campaign in full swing, Hosier and Lemelson decided to focus on large corporations with deep pockets, customers of Cognex and Symbol Technologies that made use of the technology. Getting them to pay, Hosier said, was based on a simple premise.

"This business is not based on what's right or what's wrong," Hosier said. "It's based on fear. Nobody would pay you for a patent unless they feared that the consequences of not paying you vastly exceeded the consequences of paying."

Not everyone relented. Ford Motor Co., Chrysler, General Motors and Motorola believed Lemelson had to be stopped and filed suit in September 1992. Other Fortune 500 titans also joined the fight. Mitsubishi Electric Corp. and Mitsubishi Electronic America, Inc. struck back in a February 1993 lawsuit.

If these behemoths pooled their resources they could drown Hosier's small team of lawyers. The legal costs were unthinkable, the paperwork unimaginable.

Something had to be done. One of Hosier's most trusted lawyers, Steve Lisa, persuaded GM to sit out the litigation after a craps game one night in Reno, Nev. Chrysler later snapped up the same deal.

The ramifications were enormous. It meant Hosier would only face Ford at trial. GM and Chrysler would save millions of dollars in legal fees and let Ford do all the work.

"It was what enabled us to continue on," Lisa said. "It enabled us to go toe-to-toe with the staff we had."

Motorola settled in 1994. Mitsubishi bailed out the next year and handed over another royalty check to Hosier.

But Ford pressed forward. Lemelson, who had by then been diagnosed with cancer, seemed somber and tired, almost frail. He spoke softly.

The car companies had put Lemelson through the wringer, subjecting him to hundreds of hours -- 60-odd days -- of brutal depositions. "I just hope no other inventor has to go through what I went through with these people," he said on April 8, 1996.

A week later, U.S. District Judge Lloyd George effectively eliminated all the machine vision and bar code patents.

The Lemelson freight train had been derailed. "A dark chapter in the history of the American patent system" had come to a close, said Roger May, Ford's lawyer.

But then, a final twist.

George reversed his own decision. He ruled in Lemelson's favor on April 28, 1997, stunning Ford and the patent world.

Lemelson, in his hospital bed, raised an emaciated arm in victory.

He died on Oct. 1, 1997.

"I think you will find his legend will grow," Hosier said at Lemelson's memorial service. "I predict he will be recognized as one of the greatest minds of the 20th century and of all time."

Jerome Lemelson and the patent that he argued led to bar-code technology.Jerome Lemelson "wanted people to respect him and respect his name," says his wife, Dolly. To do so, the inventor teamed up with patent attorney Gerald Hosier, right, and won millions in court victories and settlements.