Enum Class CsamAnalyzer

java.lang.Object
java.lang.Enum<CsamAnalyzer>
ch.privately.owas.csam.CsamAnalyzer
All Implemented Interfaces:
Serializable, Comparable<CsamAnalyzer>, Constable

public enum CsamAnalyzer extends Enum<CsamAnalyzer>
Detects CSAM in an images, using a combination of nudity detection and facial age estimation.
  • Enum Constant Details

  • Method Details

    • values

      public static CsamAnalyzer[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CsamAnalyzer valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • init

      public void init(android.content.Context context) throws IllegalStateException, IOException, InvalidKeyException
      Initialize the CsamAnalyzer.
      Parameters:
      context - The context to use for initialisation.
      Throws:
      IllegalStateException - Thrown if PrivatelyCore hasn't been initialized.
      IOException - Thrown if some files can't be accessed.
      InvalidKeyException - Thrown if the key for model decryption is invalid.
    • containsCsam

      public boolean containsCsam(android.graphics.Bitmap image) throws IllegalStateException
      Detects if an image contains CSAM.
      Parameters:
      image - The image to analyse for CSAM content.
      Returns:
      true if CSAM is detected in the image, false otherwise.
      Throws:
      IllegalStateException - Thrown if the CsamAnalyzer is not initialized.