[Scipy-tickets] [SciPy] #353: Making sandbox.image into a working shape

SciPy scipy-tickets at scipy.net
Sun Jan 21 11:09:11 CST 2007


#353: Making sandbox.image into a working shape
-------------------------+--------------------------------------------------
 Reporter:  nadavhoresh  |       Owner:  somebody   
     Type:  defect       |      Status:  new        
 Priority:  normal       |   Milestone:             
Component:  Other        |     Version:             
 Severity:  blocker      |    Keywords:  image color
-------------------------+--------------------------------------------------
 Currently sandbox.image would not install.
 Changes to be made:
 1. comment out line 5 in __init__.py:
  #from info_image import __doc__

 2. In the installation procedure a directory named colordata must be
    created under the image sudirectory, and all the .txt files must be
    copied there.
 3. A patch I made to make color.py (more) usable:

 0a1
 >
 2c3
 < import scipy.linalg
 ---
 > import scipy
 141d141
 <     'Convert normlized xy color coordinated to XYZ (with Y=1)'
 176,182c176,177
 < def convert(matrix, img, axis=None):
 <     '''
 <       img:    A trichromatic image array
 <       matrix: A 3x3 linear color transformation matrix
 <       axis:   The image color-planes coordinate
 <     '''
 <     img = sb.asarray(img)
 ---
 > def convert(matrix,TTT,axis=None):
 >     TTT = sb.asarray(TTT)
 184c179
 <         axis = coloraxis(img.shape)
 ---
 >         axis = coloraxis(TTT.shape)
 186,189c181,184
 <         img = sb.swapaxes(img,0,axis)
 <     oldshape = img.shape
 <     img = sb.reshape(img,(3,-1))
 <     OUT = sb.dot(matrix, img)
 ---
 >         TTT = sb.swapaxes(TTT,0,axis)
 >     oldshape = TTT.shape
 >     TTT = sb.reshape(TTT,(3,-1))
 >     OUT = sb.dot(matrix, TTT)
 211d205
 <     'Separate a trichromatic image into its color planes'
 225d218
 <     'Join 3 MxN matrices into a trichromatic image array along axis
 "axis"'

-- 
Ticket URL: <http://projects.scipy.org/scipy/scipy/ticket/353>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list