亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? imagexor.java

?? 用Java編寫的手寫數字識別器源代碼。能夠對手寫數字有很好的識別能力。經過試驗
?? JAVA
字號:
import java.applet.*;
import java.awt.*;
import java.awt.image.*;
import java.net.*;
import java.util.*;
import java.io.*; 


/**
 *ImageXor is an algorithm to apply logical XOR/XNOR between two images
 *@author:Judy Robertson, SELLIC OnLine
 *@author:Neil Brown, DAI
 *@author:Timothy Sharman
 *@see code.iface.imagexor
 */

public class ImageXor extends Thread{

  //the width of the input images in pixels
  private int i1_w;
  private int i2_w;

  //the width and height of the output image

  private int d_w;
  private int d_h;
  private int[] dest_1d;
  private boolean is_colored;
 

  /**
   *Constructs a new Image Xor
   *@param firstwidth The width of the iorst input image
   *@param secondwidth The width of the second input image
   */

  public ImageXor(int firstwidth, int secondwidth){
     i1_w = firstwidth;
     i2_w = secondwidth;
  }

  /**
   *Applies the image XOR operator on the specified image arrays, with the specified offset and scale value
   *@param src1_1d The first source image as a pixel array
   *@param src2_1d The second source image as a pixel array
   *@param XNOR Boolean to indicate wether we should XNOR rather than XOR
   *@param width width of the destination image in pixels
   *@param height height of the destination image in pixels
   *@param oset The offset value
   *@param scale The scale value
   *@return A pixel array containing the X(N)OR of the two input images
   */

  //Bob's image xor algorithm..
  /*a) assume the image is grey level (hence RR=GG=BB)
        b) use value &0x000000ff to get the BB value
        c) do this for both input images
        d) apply the operation (eg XOR)
        e) add oset and then scale
        f) clip to lie from 0 to 255. Call this value 0xCD
        g) create int value 0xffCDCDCD
 */

  public int [] doXor(int [] src1_1d, int [] src2_1d, boolean XNOR, 
        int width, int height, float oset, float scale){
    
    int place1 = -1;
    int place2 = -1;
    int src1rgb = 0;
    int src2rgb = 0;
    int result = 0;
    //Get size of image and make 1d_arrays
    d_w = width;
    d_h = height;
    
    dest_1d = new int[d_w*d_h];
    
    boolean firstwider = false;
    boolean secondwider = false;
    int wrap;
    
    if (i1_w > d_w){
      wrap =   ((i1_w + 1) - d_w);
      firstwider = true;
    } else if (i2_w > d_w){
      wrap =    ((i2_w + 1) - d_w);
      secondwider = true;
      
    } else {
      wrap = 0;
    }
    
    //if you know there is no wrap around, you can save yourself some time
    
    if (wrap == 0) {
      for (int i=0; i< dest_1d. length ; i++){
 src2rgb = src2_1d[i] & 0x000000ff;
 src1rgb = src1_1d[i] & 0x000000ff;
 
 /* Due to Java not having unsigned ints, the ~ will always give a
    negative result. As we a dealing with only the bottom 8 bits of
    the int, I will just mask out the bottom bits. Neil.
    */
 if (XNOR) {
   result = (int) ((scale * (float)(~(src1rgb ^ src2rgb) & 0xff))+oset);
 } else {
   result = (int) ((scale * (float) ( src1rgb ^ src2rgb )) + oset);
 }
 //clip to 0 ... 256
 if (result < 0){
   result = 0;
 } else if  (result > 255){
   result = 255;
 }
 
 //create an int value for dest_1d
 dest_1d[i ] =  0xff000000 | (result + (result << 16) + (result << 8));
 
      }
      
      return dest_1d;
      
    }
    else {
      
      for (int i=0; i< dest_1d. length ; i++){
 
 //we might need to skip out some pixels which aren't in the overlap area
 
 if ((i %d_w  ) == 0 ) {
   if ( i == 0 ){
     place1 = 0;
     place2 = 0;
   } else if (secondwider) {
     place2 = place2 + wrap;
     place1 ++;
   } else {
     place1 = place1 + wrap;
     place2 ++;
   }
 } else{
   place2 ++;
   place1 ++;
 }
 
 src2rgb = src2_1d[place2] & 0x000000ff;
 src1rgb = src1_1d[place1] & 0x000000ff;
 
 /* Due to Java not having unsigned ints, the ~ will always give a
    negative result. As we a dealing with only the bottom 8 bits of
    the int, I will just mask out the bottom bits. Neil.
    */
 if (XNOR) {
   result = (int) ((scale * (float) (~(src1rgb ^ src2rgb) & 0xff))+ oset);
 } else {
   result = (int) ((scale * (float) ( src1rgb ^ src2rgb )) + oset);
 }
 
 //clip to 0 ... 256
 if (result < 0){
   result = 0;
 } else if  (result > 255){
   result = 255;
 }
 
 //create an int value for dest_1d
 dest_1d[i ] =  0xff000000 | (result + (result << 16) + (result << 8));
      }
      return dest_1d;
    }
  }
  
  /**
   *XORs the specified input image by the constant, also adds offset
   *
   *@param src1_1d The input pixel array
   *@param constant The constant value to AND every pixel in the input array by
   *@param XNOR Boolean to indicate wether we should XNOR rather than XOR
   *@param width width of the destination image in pixels
   *@param height height of the destination image in pixels
   *@param oset The offset value
   *@param scale The scale value
   *@return A pixel array with the constant value X(N)ORed with every pixel in the input array
   */

  public int [] doXor(int [] src1_1d, int constant, boolean XNOR,
        int width, int height, float oset, float scale ){
    
    //Get size of image and make 1d_arrays
    d_w = width;
    d_h = height;
    
    dest_1d = new int[d_w*d_h];
    
    int src1rgb;
    int result = 0;
    
    /* Due to Java not having unsigned ints, the ~ will always give a
       negative result. As we a dealing with only the bottom 8 bits of
       the int, I will just mask out the bottom bits. Neil.
       */
    //now do the XOR on the input image 
    
    for (int i=0; i< src1_1d. length; i++){
      src1rgb = src1_1d[i] & 0x000000ff;
      if(XNOR) {
 result = (int) (( scale * ((float) (~(src1rgb ^ constant) &0xff))) + oset);
      } else {
 result = (int) (( scale * ((float) ( src1rgb ^ constant ))) + oset);
      }
      if (result > 255){
 result = 255;
      }
      if (result < 0){
 result = 0;
      }
      dest_1d[i] =  0xff000000 | (result + (result << 16) + (result << 8));
    }
    return dest_1d;
    
  }
  
  
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本久道久久综合中文字幕 | 日韩主播视频在线| 久久99热这里只有精品| 色综合久久久久综合体| 精品国产精品网麻豆系列| 亚洲欧美区自拍先锋| 国产美女视频91| 欧美一区永久视频免费观看| 国产精品二区一区二区aⅴ污介绍| 青青草97国产精品免费观看无弹窗版| 成人av网在线| 久久综合视频网| 日韩不卡在线观看日韩不卡视频| 色综合久久久久| 中文字幕av在线一区二区三区| 免费的国产精品| 欧美挠脚心视频网站| 亚洲色欲色欲www在线观看| 风流少妇一区二区| 久久久久久亚洲综合影院红桃| 午夜欧美在线一二页| 欧美在线观看一区| 亚洲精品国产成人久久av盗摄| 99久久精品免费看国产免费软件| 久久综合狠狠综合久久综合88| 日韩激情中文字幕| 6080国产精品一区二区| 亚洲午夜影视影院在线观看| 一本色道综合亚洲| 亚洲欧美电影一区二区| 色综合久久中文综合久久牛| 亚洲欧美另类小说| 色综合久久综合中文综合网| 伊人开心综合网| 欧美午夜不卡在线观看免费| 亚洲综合色成人| 欧美日韩一区二区三区四区五区| 亚洲自拍与偷拍| 欧美日韩精品欧美日韩精品一| 亚洲一区二区三区国产| 91精品国产一区二区三区 | 亚洲男人天堂一区| 91亚洲国产成人精品一区二三 | 精品久久人人做人人爱| 久久成人免费日本黄色| 久久免费电影网| 成人黄色大片在线观看| 一区二区三区在线播放| 欧美色图免费看| 美女视频黄a大片欧美| 欧美电视剧在线看免费| 激情图片小说一区| 国产日韩v精品一区二区| 本田岬高潮一区二区三区| 中文字幕一区av| 欧美日韩综合不卡| 久久av中文字幕片| 蜜臀av国产精品久久久久| 国产精品麻豆久久久| 91精品国产综合久久福利软件 | 久久国产精品露脸对白| 亚洲va韩国va欧美va精品 | 一区二区三区小说| 91 com成人网| 蜜臀99久久精品久久久久久软件| www.亚洲在线| 亚洲一区中文在线| 欧美日韩大陆一区二区| 亚洲国产综合在线| 欧美zozozo| 国产精品嫩草影院com| 欧美精品一二三| 首页欧美精品中文字幕| 久久你懂得1024| 亚洲免费观看高清完整版在线| 日本特黄久久久高潮| 久久精品一区二区| 这里只有精品电影| 麻豆精品在线观看| 欧美日韩国产美女| 日韩免费看的电影| 国产成人免费在线观看不卡| 91色porny| 51精品久久久久久久蜜臀| 久久婷婷成人综合色| 樱桃国产成人精品视频| 蜜桃一区二区三区在线观看| 国产亚洲成年网址在线观看| 有坂深雪av一区二区精品| 亚洲成人av中文| 国产亚洲欧洲一区高清在线观看| 国产精品免费免费| 欧美成人精精品一区二区频| 成人性生交大片免费看中文网站| 国产清纯美女被跳蛋高潮一区二区久久w | 秋霞成人午夜伦在线观看| 精品美女一区二区| 国产清纯在线一区二区www| 一区二区中文字幕在线| 日韩精品免费视频人成| 国产成人精品一区二| 99久久99久久免费精品蜜臀| 国产精品不卡在线观看| 一区二区在线观看av| 麻豆精品一区二区av白丝在线| 亚洲在线中文字幕| 欧美一区二区大片| 伊人开心综合网| 色国产综合视频| 国产精品久久久久久久久图文区| 在线播放欧美女士性生活| 久久99这里只有精品| 日韩伦理av电影| 韩国欧美国产1区| 日韩手机在线导航| 不卡的av网站| 久久久久一区二区三区四区| 欧美一区二区三区免费视频| 日本欧美一区二区三区| 久久久久久久综合日本| 日本va欧美va瓶| 一本色道**综合亚洲精品蜜桃冫| 国产欧美日韩视频在线观看| 中文字幕av不卡| 国产成人午夜精品影院观看视频| 欧美性做爰猛烈叫床潮| 国产成人午夜视频| 日韩亚洲欧美一区| 一区二区三区波多野结衣在线观看| 91久久免费观看| 国产精品国产自产拍高清av王其 | 91麻豆精品国产| 中文字幕制服丝袜一区二区三区| 日韩一区二区在线播放| 粉嫩av亚洲一区二区图片| 91精品国产综合久久国产大片| 久久色在线视频| 欧美日韩精品三区| 在线视频你懂得一区二区三区| 激情久久五月天| 粗大黑人巨茎大战欧美成人| 国产色91在线| 首页亚洲欧美制服丝腿| 中文字幕二三区不卡| 国产视频911| 日日夜夜精品免费视频| 色综合色综合色综合| 国产在线播放一区| 欧美日本在线一区| 色噜噜狠狠成人网p站| 欧美日韩电影在线播放| 欧美精品一区二区三区在线| 国产精品乱人伦一区二区| 亚洲观看高清完整版在线观看| 久久国产精品一区二区| 91免费看视频| 欧美岛国在线观看| 中文字幕人成不卡一区| 美女网站在线免费欧美精品| 9色porny自拍视频一区二区| 欧美高清精品3d| 中文字幕一区免费在线观看| 偷拍一区二区三区| 波多野结衣在线aⅴ中文字幕不卡| 欧美日本免费一区二区三区| 欧美激情在线观看视频免费| 日日摸夜夜添夜夜添国产精品| 暴力调教一区二区三区| 欧美一二三四区在线| 一区二区三区精品在线| 国产一区高清在线| 91精品欧美久久久久久动漫| 国产精品精品国产色婷婷| 久久成人18免费观看| 91黄色激情网站| 国产三区在线成人av| 久久99精品久久久久久动态图| 色综合 综合色| 国产精品久久久久久久久果冻传媒| 蜜桃av一区二区| 欧美日韩久久一区| 亚洲乱码日产精品bd| 粉嫩一区二区三区在线看| 精品99999| 麻豆成人91精品二区三区| 欧美喷潮久久久xxxxx| 一区二区三区视频在线观看| 成人av网站在线| 国产精品不卡在线观看| 成人免费黄色大片| 久久久精品2019中文字幕之3| 免费美女久久99| 884aa四虎影成人精品一区| 亚洲成人av福利| 欧美日韩高清一区| 日韩精品成人一区二区三区| 欧美日韩亚洲丝袜制服| 午夜私人影院久久久久| 欧美日韩精品久久久| 五月天激情综合|