cars.applications.resampling.resampling_algo ============================================ .. py:module:: cars.applications.resampling.resampling_algo .. autoapi-nested-parse:: Resampling module: contains functions used for epipolar resampling Functions --------- .. autoapisummary:: cars.applications.resampling.resampling_algo.epipolar_rectify_images cars.applications.resampling.resampling_algo.resample_image cars.applications.resampling.resampling_algo.oversampling_func cars.applications.resampling.resampling_algo.to_band_format Module Contents --------------- .. py:function:: epipolar_rectify_images(left_imgs, right_imgs, grid1, grid2, region, margins, epipolar_size_x, epipolar_size_y, interpolator_image='bicubic', interpolator_classif='nearest', interpolator_mask='nearest', interpolators_edges=None, step=None, mask1=None, mask2=None, edges1=None, edges2=None, left_classifs=None, right_classifs=None, nodata1=0, nodata2=0, add_classif=True, add_edges=True) Resample left and right images .. py:function:: resample_image(imgs, grid, largest_size, step=None, region=None, nodata=None, mask=None, band_coords=False, interpolator_img='bicubic', interpolator_mask='nearest', img_transform=None) Resample image according to grid and largest size. :param img: Path to the image to resample :type img: string :param grid: rectification grid dict :type grid: dict :param largest_size: Size of full output image :type largest_size: list of two int :param step: horizontal step of resampling (useful for strip resampling) :type step: int :param region: A subset of the output image to produce :type region: None (full output is produced) or array of four floats [xmin,ymin,xmax,ymax] :param nodata: Nodata value to use (both for input and output) :type nodata: None or float :param mask: Mask to resample as well :type mask: None or path to mask image :param band_coords: Force bands coordinate in output dataset :type band_coords: boolean :param interpolator: interpolator type (bicubic (default) or nearest) :type interpolator: str ("nearest" "linear" "bco") :rtype: xarray.Dataset with resampled image and mask .. py:function:: oversampling_func(grid_reader, img_reader, img_transform, block_region, interpolator_img, band_coords, nb_bands, bands, resamp, nodata, msk, mask, nodata_msk, interpolator_mask, ysize, xsize, ystart, xstart) Do the resampling calculus .. py:function:: to_band_format(edges_dict) Helper function, that takes the edges input dict and transforms it into a band format image, so resampling can understand it