Package net.celisdelafuente.java.ocv

Source Code of net.celisdelafuente.java.ocv.OcvImage

package net.celisdelafuente.java.ocv;

import java.awt.image.BufferedImage;
import java.io.File;
import java.util.ArrayList;

import org.opencv.core.Mat;

import target.classes.net.celisdelafuente.java.Iutil.IImage;

public class OcvImage implements IImage {

  @Override
  public int merge(int arg0, int arg1) {
    // TODO Auto-generated method stub
    return 0;
  }

  @Override
  public int save()  {
    // TODO Auto-generated method stub
    return 0;
  }

  @Override
  public int toJpg(String arg0) {
    // TODO Auto-generated method stub
    return 0;
  }

  public static Mat merge(Mat img1, Mat img2, int x, int y){
    Mat retMat;
   
    // Copiamos imagen Destino
    retMat = img1;
   
   
    if (img1.rows() < img2.rows() || img1.cols() < img2.cols()){
     
        }
   
    // Recorrer imagen Fuente
    for (int r = 0; r < img2.rows(); r++){
          for (int c = 0; c < img2.cols(); c++){
            // Insertar el item en imagen destino
            retMat.put(r + y, c + x, img2.get(r, c));
            }
        }
   
    return retMat;
  }
}
TOP

Related Classes of net.celisdelafuente.java.ocv.OcvImage

TOP
Copyright © 2018 www.massapi.com. 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.