Documentation of 'org.neuroph.imgrec.ImageRecognitionPlugin' Java class
ImageRecognitionPlugin
org.neuroph.imgrec

Class ImageRecognitionPlugin

  • All Implemented Interfaces:
    java.io.Serializable


    public class ImageRecognitionPlugin
    extends PluginBase
    implements java.io.Serializable
    Provides image recognition specific properties like sampling resolution, and easy to use image recognition interface for neural network.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String IMG_REC_PLUGIN_NAME 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      ColorMode getColorMode()
      Returns color mode used for image recognition
      java.util.HashMap<java.lang.String,Neuron> getMaxOutput()
      Returns one or more image labels with the maximum output - recognized images
      java.util.HashMap<java.lang.String,java.lang.Double> getOutput()
      Returns image recognition result as map with image labels as keys and recogition result as value
      Dimension getSamplingResolution()
      Returns image sampling resolution (dimensions)
      void processInput() 
      java.util.HashMap<java.lang.String,java.lang.Double> recognizeImage(java.awt.image.BufferedImage img) 
      java.util.HashMap<java.lang.String,java.lang.Double> recognizeImage(java.io.File imgFile)
      This method performs the image recognition for specified image file.
      java.util.HashMap<java.lang.String,java.lang.Double> recognizeImage(Image img)
      This method performs the image recognition for specified image.
      java.util.HashMap<java.lang.String,java.lang.Double> recognizeImage(java.net.URL imgURL)
      This method performs the image recognition for specified image URL.
      void setInput(java.io.File imgFile)
      Sets network input (image to recognize) from the specified File object
      void setInput(Image img)
      Sets network input (image to recognize) from the specified BufferedImage object
      void setInput(java.net.URL imgURL)
      Sets network input (image to recognize) from the specified URL object
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • IMG_REC_PLUGIN_NAME

        public static final java.lang.String IMG_REC_PLUGIN_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • ImageRecognitionPlugin

        public ImageRecognitionPlugin(Dimension samplingResolution)
        Constructor
        Parameters:
        samplingResolution - image sampling resolution (dimensions)
      • ImageRecognitionPlugin

        public ImageRecognitionPlugin(Dimension samplingResolution,
                                      ColorMode colorMode)
        Constructor
        Parameters:
        samplingResolution - image sampling resolution (dimensions)
        colorMode - recognition color mode
    • Method Detail

      • getSamplingResolution

        public Dimension getSamplingResolution()
        Returns image sampling resolution (dimensions)
        Returns:
        image sampling resolution (dimensions)
      • getColorMode

        public ColorMode getColorMode()
        Returns color mode used for image recognition
        Returns:
        color mode used for image recognition
      • setInput

        public void setInput(java.io.File imgFile)
                      throws java.io.IOException,
                             ImageSizeMismatchException
        Sets network input (image to recognize) from the specified File object
        Parameters:
        imgFile - file of the image to recognize
        Throws:
        java.io.IOException
        ImageSizeMismatchException
      • setInput

        public void setInput(java.net.URL imgURL)
                      throws java.io.IOException,
                             ImageSizeMismatchException
        Sets network input (image to recognize) from the specified URL object
        Parameters:
        imgURL - url of the image
        Throws:
        java.io.IOException
        ImageSizeMismatchException
      • processInput

        public void processInput()
      • getOutput

        public java.util.HashMap<java.lang.String,java.lang.Double> getOutput()
        Returns image recognition result as map with image labels as keys and recogition result as value
        Returns:
        image recognition result
      • recognizeImage

        public java.util.HashMap<java.lang.String,java.lang.Double> recognizeImage(Image img)
                                                                            throws ImageSizeMismatchException
        This method performs the image recognition for specified image. Returns image recognition result as map with image labels as keys and recogition result as value
        Returns:
        image recognition result
        Throws:
        ImageSizeMismatchException
      • recognizeImage

        public java.util.HashMap<java.lang.String,java.lang.Double> recognizeImage(java.io.File imgFile)
                                                                            throws java.io.IOException,
                                                                                   ImageSizeMismatchException
        This method performs the image recognition for specified image file. Returns image recognition result as map with image labels as keys and recogition result as value
        Returns:
        image recognition result
        Throws:
        java.io.IOException
        ImageSizeMismatchException
      • recognizeImage

        public java.util.HashMap<java.lang.String,java.lang.Double> recognizeImage(java.net.URL imgURL)
                                                                            throws java.io.IOException,
                                                                                   ImageSizeMismatchException
        This method performs the image recognition for specified image URL. Returns image recognition result as map with image labels as keys and recogition result as value
        Returns:
        image recognition result
        Throws:
        java.io.IOException
        ImageSizeMismatchException
      • getMaxOutput

        public java.util.HashMap<java.lang.String,Neuron> getMaxOutput()
        Returns one or more image labels with the maximum output - recognized images
        Returns:
        one or more image labels with the maximum output

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.