Package marvin.image

Examples of marvin.image.MarvinImage


 
  private void loadImages()
  {
    originalImage = MarvinImageIO.loadImage("./images/image01.jpg");
    originalImage.resize(600, 350);
    imageIn = new MarvinImage(originalImage.getWidth(), originalImage.getHeight());
    imageOut = new MarvinImage(originalImage.getWidth(), originalImage.getHeight());;
    imagePanel.setImage(originalImage);
  }
View Full Code Here


   
   
    /*
     * IMAGE TESTS
     */
    image = new MarvinImage(200,200);
    image.fillRect(250, 10, 100, 100, Color.blue);
   
    image2 = MarvinImageIO.loadImage("./images/image01.jpg");
    MarvinImageIO.saveImage(image2, "./images/image01_test.jpg");
    image2.resize(350, 300);
View Full Code Here

  }
 
 
  public void applyFilter(MarvinImagePanel panel, MarvinImage image, String filter)
  {
    MarvinImage alterImage = image;
   
    imagePlugin = MarvinPluginLoader.loadImagePlugin(filter);
    imagePlugin.process(alterImage, alterImage);
    panel.setImage(alterImage);
  }
View Full Code Here

    panel.setImage(alterImage);
  }
 
  public void applyFilter(MarvinImagePanel panel, MarvinImage image, String filter, MarvinImageMask mask)
  {
    MarvinImage alterImage = image;
   
    imagePlugin = MarvinPluginLoader.loadImagePlugin(filter);
    imagePlugin.setAttribute("thereshold", 50000);
    imagePlugin.process(alterImage, alterImage, mask);
    panel.setImage(alterImage);
View Full Code Here

    panel.setImage(alterImage);
  }
 
  public void applyFilter(MarvinImagePanel panel, MarvinImage image, String filter, MarvinAttributes attr, MarvinImageMask mask)
  {
    MarvinImage alterImage = image;
   
    imagePlugin = MarvinPluginLoader.loadImagePlugin(filter);
    imagePlugin.load();
    imagePlugin.setAttribute("thereshold", 50000);
    imagePlugin.process(alterImage, alterImage, attr, mask, true);
View Full Code Here

  }
 
 
 
  public MarvinImage showCorners(MarvinImage image, MarvinAttributes attr, int rectSize){
    MarvinImage ret = image.clone();
    int[][] cornernessMap = (int[][]) attr.get("cornernessMap");
    int rsize=0;
    for(int x=0; x<cornernessMap.length; x++){
      for(int y=0; y<cornernessMap[0].length; y++){
        // Is it a corner?
        if(cornernessMap[x][y] > 0){
          rsize = Math.min(Math.min(Math.min(x, rectSize), Math.min(cornernessMap.length-x, rectSize)), Math.min(Math.min(y, rectSize), Math.min(cornernessMap[0].length-y, rectSize)));
          ret.fillRect(x, y, rsize, rsize, Color.red);
        }       
      }
    }
   
    return ret;
View Full Code Here

TOP

Related Classes of marvin.image.MarvinImage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.