Lines Matching refs:Chart
78 class Chart(object):
79 """Definition for chart object.
81 Defines PNG reference file, chart size and distance, and scaling range.
90 chart_file: str; absolute path to png file of chart
91 height: float; height in cm of displayed chart
92 distance: float; distance in cm from camera of displayed chart
93 scale_start: float; start value for scaling for chart search
94 scale_stop: float; stop value for scaling for chart search
95 scale_step: float; step value for scaling for chart search
111 print 'Chart locator skipped.'
123 """Take an image with s, e, & fd to find the chart location.
135 template: numpy array; chart template for locator
136 img_3a: numpy array; RGB image for chart location
137 scale_factor: float; scaling factor for chart search
149 print ' Chart distance: %.2fcm' % self._distance
150 print ' Chart height: %.2fcm' % self._height
156 print 'Chart/image scale factor = %.2f' % scale_factor
160 """Find the chart in the image, and append location to chart object.
163 xnorm: float; [0, 1] left loc of chart in scene
164 ynorm: float; [0, 1] top loc of chart in scene
165 wnorm: float; [0, 1] width of chart in scene
166 hnorm: float; [0, 1] height of chart in scene
167 scale: float; scale factor to extract chart
176 chart, scene, s_factor = self._calc_scale_factors(cam, props, fmt,
179 print 'Chart locator skipped.'
191 print 'Finding chart in scene...'
194 if (scene_scaled.shape[0] < chart.shape[0] or
195 scene_scaled.shape[1] < chart.shape[1]):
197 result = cv2.matchTemplate(scene_scaled, chart, cv2.TM_CCOEFF)
206 estring = ('Warning: unable to find chart in scene!\n'
214 estring = ('Warning: chart is at extreme range of locator '
222 h, w = chart.shape
348 Test by using PNG of ISO12233 chart and blurring intentionally.
356 chart = cv2.imread(chart_file, cv2.IMREAD_ANYDEPTH)
357 white_level = numpy.amax(chart).astype(float)
360 blur = cv2.blur(chart, (j, j))