Johns Hopkins Hospital has agreed to a $190 million settlement with more than 8,000 patients of a gynecologist who secretly photographed and videotaped women in the examining room with a pen-like camera he wore around his neck, officials said.