In more than a decade in office, Mayor Michael R. Bloomberg has often championed the use of cutting-edge technology to help solve age-old problems in New York.

And when it comes to law enforcement, the mayor and his police commissioner, Raymond W. Kelly, have steadfastly supported the increasing use of video surveillance as one of the more effective means to combat crime.

But when Judge Shira A. Scheindlin, of Federal District Court in Manhattan, ruled on Monday that the city’s stop-and-frisk program was unconstitutional and ordered that police officers in certain precincts strap tiny cameras to their uniforms to record their dealings with the public, Mr. Bloomberg’s response was immediate and emphatic.