¡@

Home 

python Programming Glossary: r.shape

more efficient way to calculate distance in numpy?

http://stackoverflow.com/questions/17527340/more-efficient-way-to-calculate-distance-in-numpy

numpy.newaxis R1 R1 R R1 del R1 print R1 t time.time t0 R.shape #11.7576191425 108225 10500 print numpy.max R #4176.26290975.. 'ijk ijk ij' deltas deltas print R2 t time.time t0 R.shape #14.5291359425 108225 10500 print numpy.max R #4176.26290975.. 10500 2 R inner1d deltas deltas print R3 t time.time t0 R.shape #12.6972110271 108225 10500 print numpy.max R #4176.26290975..

Detecting thresholds in HSV color space (from RGB) using Python / PIL

http://stackoverflow.com/questions/4890373/detecting-thresholds-in-hsv-color-space-from-rgb-using-python-pil

a 2 .T C M m #chroma Cmsk C 0 # Hue H numpy.zeros R.shape int mask M R Cmsk H mask numpy.mod 60 G B C 360 mask mask M.. convert to uint8 # Value V M # Saturation S numpy.zeros R.shape int S Cmsk 255 C V Cmsk # H S and V are now defined as integers..