<commit_before>Binarize
========

.. function:: Binarize(clip clip[, float[] threshold, float[] v0=0, float[] v1, int[] planes=[0, 1, 2]])
   :module: std

   Turns every pixel in the image into either *v0*, if it's below
   *threshold*, or *v1*, otherwise.

   *clip*
      Clip to process. It must have constant format, integer sample type,
      and bit depth between 8 and 16.

   *threshold*
      Defaults to the middle point of range allowed by the format.
      Can be specified for each plane individually.

   *v0*
      Value given to pixels that are below *threshold*. Can be specified
      for each plane individually.

   *v1*
      Value given to pixels that are greater than or equal to *threshold*.
      Defaults to the maximum value allowed by the format. Can be specified
      for each plane individually.

   *planes*
      Specifies which planes will be processed. Any unprocessed planes
      will be simply copied.
<commit_msg>Update binarize.rst<commit_after>Binarize
========

.. function:: Binarize(clip clip[, float[] threshold, float[] v0=0, float[] v1, int[] planes=[0, 1, 2]])
   :module: std

   Turns every pixel in the image into either *v0*, if it's below
   *threshold*, or *v1*, otherwise.

   *clip*
      Clip to process. It must have integer sample type and bit depth
      between 8 and 16, or float sample type and bit depth of 32. If
      there are any frames with other formats, an error will be
      returned.

   *threshold*
      Defaults to the middle point of range allowed by the format.
      Can be specified for each plane individually.

   *v0*
      Value given to pixels that are below *threshold*. Can be specified
      for each plane individually.

   *v1*
      Value given to pixels that are greater than or equal to *threshold*.
      Defaults to the maximum value allowed by the format. Can be specified
      for each plane individually.

   *planes*
      Specifies which planes will be processed. Any unprocessed planes
      will be simply copied.

{'fraction_non_alphanumeric': 0.07726597325408618, 'fraction_numerical': 0.013868251609707775, 'mean_word_length': 2.8846153846153846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6581721', 'n_tokens_mistral': 564, 'n_tokens_neox': 527, 'n_words': 279}