class_docstr: Constructs a Nougat image processor.
  
  Args:
      do_crop_margin (`bool`, *optional*, defaults to `True`):
          Whether to crop the image margins.
      do_resize (`bool`, *optional*, defaults to `True`):
          Whether to resize the image's (height, width) dimensions to the specified `size`. Can be overridden by
          `do_resize` in the `preprocess` method.
      size (`Dict[str, int]` *optional*, defaults to `{"height": 896, "width": 672}`):
          Size of the image after resizing. Can be overridden by `size` in the `preprocess` method.
      resample (`PILImageResampling`, *optional*, defaults to `Resampling.BILINEAR`):
          Resampling filter to use if resizing the image. Can be overridden by `resample` in the `preprocess` method.
      do_thumbnail (`bool`, *optional*, defaults to `True`):
          Whether to resize the image using thumbnail method.
      do_align_long_axis (`bool`, *optional*, defaults to `False`):
          Whether to align the long axis of the image with the long axis of `size` by rotating by 90 degrees.
      do_pad (`bool`, *optional*, defaults to `True`):
          Whether to pad the images to the largest image size in the batch.
      do_rescale (`bool`, *optional*, defaults to `True`):
          Whether to rescale the image by the specified scale `rescale_factor`. Can be overridden by the `do_rescale`
          parameter in the `preprocess` method.
      rescale_factor (`int` or `float`, *optional*, defaults to `1/255`):
          Scale factor to use if rescaling the image. Can be overridden by the `rescale_factor` parameter in the
          `preprocess` method.
      do_normalize (`bool`, *optional*, defaults to `True`):
          Whether to normalize the image. Can be overridden by `do_normalize` in the `preprocess` method.
      image_mean (`float` or `List[float]`, *optional*, defaults to `IMAGENET_DEFAULT_MEAN`):
          Mean to use if normalizing the image. This is a float or list of floats the length of the number of
          channels in the image. Can be overridden by the `image_mean` parameter in the `preprocess` method.
      image_std (`float` or `List[float]`, *optional*, defaults to `IMAGENET_DEFAULT_STD`):
          Image standard deviation.
class_docstr_tok: ["Constructs","a","Nougat","image","processor",".","Args",":","do_crop_margin","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","crop","the","image","margins",".","do_resize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","resize","the","image","'s","(","height",",","width",")","dimensions","to","the","specified","`","size","`",".","Can","be","overridden","by","`","do_resize","`","in","the","`","preprocess","`","method",".","size","(","`","Dict","[","str",",","int","]","`","*","optional","*",",","defaults","to","`","{","``","height","''",":","896",",","``","width","''",":","672","}","`",")",":","Size","of","the","image","after","resizing",".","Can","be","overridden","by","`","size","`","in","the","`","preprocess","`","method",".","resample","(","`","PILImageResampling","`",",","*","optional","*",",","defaults","to","`","Resampling.BILINEAR","`",")",":","Resampling","filter","to","use","if","resizing","the","image",".","Can","be","overridden","by","`","resample","`","in","the","`","preprocess","`","method",".","do_thumbnail","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","resize","the","image","using","thumbnail","method",".","do_align_long_axis","(","`","bool","`",",","*","optional","*",",","defaults","to","`","False","`",")",":","Whether","to","align","the","long","axis","of","the","image","with","the","long","axis","of","`","size","`","by","rotating","by","90","degrees",".","do_pad","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","pad","the","images","to","the","largest","image","size","in","the","batch",".","do_rescale","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","rescale","the","image","by","the","specified","scale","`","rescale_factor","`",".","Can","be","overridden","by","the","`","do_rescale","`","parameter","in","the","`","preprocess","`","method",".","rescale_factor","(","`","int","`","or","`","float","`",",","*","optional","*",",","defaults","to","`","1\/255","`",")",":","Scale","factor","to","use","if","rescaling","the","image",".","Can","be","overridden","by","the","`","rescale_factor","`","parameter","in","the","`","preprocess","`","method",".","do_normalize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","normalize","the","image",".","Can","be","overridden","by","`","do_normalize","`","in","the","`","preprocess","`","method",".","image_mean","(","`","float","`","or","`","List","[","float","]","`",",","*","optional","*",",","defaults","to","`","IMAGENET_DEFAULT_MEAN","`",")",":","Mean","to","use","if","normalizing","the","image",".","This","is","a","float","or","list","of","floats","the","length","of","the","number","of","channels","in","the","image",".","Can","be","overridden","by","the","`","image_mean","`","parameter","in","the","`","preprocess","`","method",".","image_std","(","`","float","`","or","`","List","[","float","]","`",",","*","optional","*",",","defaults","to","`","IMAGENET_DEFAULT_STD","`",")",":","Image","standard","deviation","."]
code: def __init__(
      self,
      do_crop_margin: bool = True,
      do_resize: bool = True,
      size: Dict[str, int] = None,
      resample: PILImageResampling = PILImageResampling.BILINEAR,
      do_thumbnail: bool = True,
      do_align_long_axis: bool = False,
      do_pad: bool = True,
      do_rescale: bool = True,
      rescale_factor: Union[int, float] = 1 / 255,
      do_normalize: bool = True,
      image_mean: Optional[Union[float, List[float]]] = None,
      image_std: Optional[Union[float, List[float]]] = None,
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
  
      size = size if size is not None else {"height": 896, "width": 672}
      size = get_size_dict(size)
  
      self.do_crop_margin = do_crop_margin
      self.do_resize = do_resize
      self.size = size
      self.resample = resample
      self.do_thumbnail = do_thumbnail
      self.do_align_long_axis = do_align_long_axis
      self.do_pad = do_pad
      self.do_rescale = do_rescale
      self.rescale_factor = rescale_factor
      self.do_normalize = do_normalize
      self.image_mean = (
          image_mean
          if image_mean is not None
          else IMAGENET_DEFAULT_MEAN
      )
      self.image_std = (
          image_std if image_std is not None else IMAGENET_DEFAULT_STD
      )
  
file_path: transformers/src/transformers/models/nougat/image_processing_nougat.py
imports: from typing import Dict, List, Optional, Union
  import numpy
  from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
  from ...image_transforms import get_resize_output_image_size, pad, resize, to_channel_dimension_format, to_pil_image
  from ...image_utils import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, ChannelDimension, ImageInput, PILImageResampling, get_image_size, infer_channel_dimension_format, is_scaled_image, make_list_of_images, to_numpy_array, valid_images
  from ...utils import TensorType, logging
  from ...utils.import_utils import is_cv2_available, is_vision_available
label_desc: Use image node_id 1 to create a new NougatImageProcessor object from inherited base classes: BaseImageProcessor with example: obj = NougatImageProcessor(do_crop_margin, do_resize, size, resample, do_thumbnail, do_align_long_axis, do_pad, do_rescale, rescale_factor, do_normalize, image_mean, image_std)