Outputs processed images
556468
public function outputCacheImage()
    {
        try {
            $this->setUrlPathImage();
            $this->setFileImage();
            $this->setDirectoryImage();
            $this->tryOutputImage();
            $this->checkCacheDirectoryImage();
            $this->applyActionsImage();
            $this->tryOutputImage();
        } catch (Exception $ex) {
            $this->response->outputError404(false);
        }
    }
318811
def run(self):
        

        self.output('PanSharpened Image processing started for bands %s' % '-'.join(map(str, self.bands)),
                    normal=True, arrow=True)

        bands = self._read_bands()
        image_data = self._get_image_data()

        new_bands = self._generate_new_bands(image_data['shape'])

        bands[:3] = self._rescale(bands[:3])
        new_bands.append(numpy.empty(image_data['shape'], dtype=numpy.uint16))

        self._warp(image_data, bands, new_bands)

        # Bands are no longer needed
        del bands

        # Calculate pan band
        pan = self._pansize(new_bands)
        del self.bands[self.band8]
        del new_bands[self.band8]

        rasterio_options = {
            'driver': 'GTiff',
            'width': image_data['shape'][1],
            'height': image_data['shape'][0],
            'count': 3,
            'dtype': numpy.uint8,
            'nodata': 0,
            'transform': image_data['dst_transform'],
            'photometric': 'RGB',
            'crs': self.dst_crs
        }

        return self._write_to_file(new_bands, pan, **rasterio_options)
1276795
public void process( T image1 , T image2 )
	{
		// declare image data structures
		if( pyr1 == null || pyr1.getInputWidth() != image1.width || pyr1.getInputHeight() != image1.height ) {
			pyr1 = UtilDenseOpticalFlow.standardPyramid(image1.width, image1.height, scale, sigma, 5, maxLayers, GrayF32.class);
			pyr2 = UtilDenseOpticalFlow.standardPyramid(image1.width, image1.height, scale, sigma, 5, maxLayers, GrayF32.class);

			pyr1.initialize(image1.width,image1.height);
			pyr2.initialize(image1.width,image1.height);
		}

		norm1.reshape(image1.width, image1.height);
		norm2.reshape(image1.width, image1.height);

		// normalize input image to make sure alpha is image independent
		imageNormalization(image1, image2, norm1, norm2);

		// create image pyramid
		pyr1.process(norm1);
		pyr2.process(norm2);

		// compute flow from pyramid
		process(pyr1, pyr2);
	}
829889
def _images(self, sys_output):
    
        '''  '''

        import re
        gap_pattern = re.compile('\t|\s{2,}')
        image_list = []
        output_lines = sys_output.split('\n')
        column_headers = gap_pattern.split(output_lines[0])
        for i in range(1,len(output_lines)):
            columns = gap_pattern.split(output_lines[i])
            if len(columns) == len(column_headers):
                image_details = {}
                for j in range(len(columns)):
                    image_details[column_headers[j]] = columns[j]
                image_list.append(image_details)

        return image_list
518808
function (images) {
    var processed = [];
    for (var i = 0; i < images.length; i++) {
      if (typeof images[i] === 'string') {
        processed.push({url: images[i]});
      }
      else if ($.isArray(images[i])) {
        processed.push(processImagesArray(images[i]));
      }
      else {
        processed.push(processOptions(images[i]));
      }
    }
    return processed;
  }
406197
def _get_outputs(self):
        
        out_size = mx_uint()
        handles = ctypes.POINTER(NDArrayHandle)()
        check_call(_LIB.MXExecutorOutputs(self.handle,
                                          ctypes.byref(out_size), ctypes.byref(handles)))
        num_output = out_size.value
        outputs = [_ndarray_cls(NDArrayHandle(handles[i])) for i in range(num_output)]
        return outputs
734506
def output_image(gandi, image, datacenters, output_keys, justify=14,
                 warn_deprecated=True):
    

    for key in output_keys:
        if key in image:
            if (key == 'label' and image['visibility'] == 'deprecated' and
                    warn_deprecated):
                image[key] = '%s /!\ DEPRECATED' % image[key]
            output_line(gandi, key, image[key], justify)

    dc_name = 'Nowhere'

    if 'dc' in output_keys:
        for dc in datacenters:
            if dc['id'] == image['datacenter_id']:
                dc_name = dc.get('dc_code', dc.get('iso', ''))

                break

        output_line(gandi, 'datacenter', dc_name, justify)
658702
def imagemagick(color_count, img, magick_command):
    """"""
    flags = ["-resize", "25%", "-colors", str(color_count),
             "-unique-colors", "txt:-"]
    img += "[0]"

    return subprocess.check_output([*magick_command, img, *flags]).splitlines()
30789
def process_files(self):
        
        config.LOGGER.info("\t*** Processing images for exercise: {}".format(self.title))
        downloaded = super(ExerciseNode, self).process_files()
        for question in self.questions:
            downloaded += question.process_question()

        self.process_exercise_data()

        config.LOGGER.info("\t*** Images for {} have been processed".format(self.title))
        return downloaded
1349981
public void process(T input, T output) {

		this.output = FactoryGImageGray.wrap(output,this.output);
		interp.setImage(input);

		int indexMap = 0;
		for( int i = 0; i < output.height; i++ ) {
			int indexOut = output.startIndex + i*output.stride;
			for( int j = 0; j < output.width; j++ , indexOut++,indexMap++ ) {
				Point2D_F32 p = mapPixels[indexMap];
				if( p != null ) {
					this.output.set(indexOut,interp.get( p.x, p.y));
				}
			}
		}
	}
68863
public void process( T image1 , T image2 , ImageFlow output) {

		InputSanityCheck.checkSameShape(image1,image2);

		derivX.reshape(image1.width,image1.height);
		derivY.reshape(image1.width,image1.height);
		derivT.reshape(image1.width,image1.height);

		averageFlow.reshape(output.width,output.height);

		if( resetOutput )
			output.fillZero();

		computeDerivX(image1,image2,derivX);
		computeDerivY(image1,image2,derivY);
		computeDerivT(image1,image2,derivT);

		findFlow(derivX,derivY,derivT,output);
	}
783012
def convertImagesToPIL(self, images, dither, nq=0):
        

        # Convert to PIL images
        images2 = []
        for im in images:
            if isinstance(im, Image.Image):
                images2.append(im)
            elif np and isinstance(im, np.ndarray):
                if im.ndim == 3 and im.shape[2] == 3:
                    im = Image.fromarray(im, 'RGB')
                elif im.ndim == 3 and im.shape[2] == 4:
                    im = Image.fromarray(im[:, :, :3], 'RGB')
                elif im.ndim == 2:
                    im = Image.fromarray(im, 'L')
                images2.append(im)

        # Convert to paletted PIL images
        images, images2 = images2, []

        # Adaptive PIL algorithm
        AD = Image.ADAPTIVE
        for im in images:
            im = im.convert('P', palette=AD, dither=dither)
            images2.append(im)

        # Done
        return images2
391243
def generate_output(inputs, output)
      inputs.each do |input|
        output.write process_filters(input)
      end
    end
805816
def run(self):
        
        self.output("* NDVI processing started.", normal=True)

        bands = self._read_bands()
        image_data = self._get_image_data()

        new_bands = []
        for i in range(0, 2):
            new_bands.append(numpy.empty(image_data['shape'], dtype=numpy.float32))

        self._warp(image_data, bands, new_bands)

        # Bands are no longer needed
        del bands

        calc_band = numpy.true_divide((new_bands[1] - new_bands[0]), (new_bands[1] + new_bands[0]))

        output_band = numpy.rint((calc_band + 1) * 255 / 2).astype(numpy.uint8)

        output_file = join(self.dst_path, self._filename(suffix='NDVI'))

        return self.write_band(output_band, output_file, image_data)
1169870
protected function process()
    {

        // initialize the array for the artefacts
        $this->artefacts = array();

        // process the images/additional images
        $this->processImages();
        $this->processAdditionalImages();

        // append the artefacts that has to be exported to the subject
        $this->addArtefacts($this->artefacts);
    }
1178189
def render(self):
        ""
        clear_output()
        self.write_csv()
        if self.empty() and self._skipped>0:
            return display(f'No images to show :). {self._skipped} pairs were '
                    f'skipped since at least one of the images was deleted by the user.')
        elif self.empty():
            return display('No images to show :)')
        if self.batch_contains_deleted():
            self.next_batch(None)
            self._skipped += 1
        else:
            display(self.make_horizontal_box(self.get_widgets(self._duplicates)))
            display(self.make_button_widget('Next Batch', handler=self.next_batch, style="primary"))
101921
def run(self):
        

        self.output('Image processing started for bands %s' % '-'.join(map(str, self.bands)), normal=True, arrow=True)

        bands = self._read_bands()
        image_data = self._get_image_data()

        new_bands = self._generate_new_bands(image_data['shape'])

        self._warp(image_data, bands, new_bands)

        # Bands are no longer needed
        del bands

        rasterio_options = {
            'driver': 'GTiff',
            'width': image_data['shape'][1],
            'height': image_data['shape'][0],
            'count': 3,
            'dtype': numpy.uint8,
            'nodata': 0,
            'transform': image_data['dst_transform'],
            'photometric': 'RGB',
            'crs': self.dst_crs
        }

        return self._write_to_file(new_bands, **rasterio_options)