zoukankan      html  css  js  c++  java
  • 颜色分类完后做图片切割

    颜色分类,之后补充图片成矩形,找出左上角点,之后找出{ r: 212, c: 41, w: 78, h: 80 };r为行y,c为列x,w为宽度,h为高度;

    const fs = require("fs")
    const getPixels = require("get-pixels")
    function getPixelsSync(filename){
    return new Promise(function (resolve,reject) {
    getPixels(filename, function(err, pixels) {
    if(err) {
    console.log("Bad image path")
    reject(err)
    return
    }
    resolve(pixels)
    })
    })
    }
    const {Matrix,Fraction,Point,Line} = require("./utils/math");
    function getColor(x,y,pixels) {
    return [
    pixels.data[x*4+y*4*pixels.shape[0]],
    pixels.data[x*4+1+y*4*pixels.shape[0]],
    pixels.data[x*4+2+y*4*pixels.shape[0]],
    pixels.data[x*4+3+y*4*pixels.shape[0]]
    ]
    }
    function isNearColor(color1,color2){
    if((Math.abs(color1[0]-color2[0])+Math.abs(color1[1]-color2[1])+Math.abs(color1[2]-color2[2])+Math.abs(color1[3]-color2[3]))<75){
    return 1;
    }
    return 0;
    }
    //将颜色分成多少种 maxTagNum是限制最大多少种
    function sortMatColor(mat1){

    function sortColor(num) {
    let map={}
    let maxKey;
    mat1.rowEach(function (item,r,c) {
    if(typeof item==="number"){return;}
    const key=item.join(',')
    if(map[key]===undefined){
    map[key]=0;
    }
    map[key]++;
    if(!maxKey){
    maxKey=key;
    }else if(map[maxKey]<map[key]){
    maxKey=key;
    }
    })

    let bgColor=maxKey.split(',').map((item)=>parseInt(item));

    let running=false;
    mat1.rowMap(function (item,r,c) {
    if(typeof item==="number"){return item;}
    if(isNearColor(item,bgColor)){
    return num;
    }else{
    running=true;
    return item;
    }
    })
    if(running){
    return sortColor(num+1);
    }
    return num+1;
    }
    return sortColor(0);
    }
    //补图为矩形
    function addOne(mat1,r,c){

    function addTop(mat1,r,c) {
    //左上角、右上角
    if(mat1.getItem(r-1,c)!==1&&(mat1.getItem(r-1,c+1)===1||mat1.getItem(r-1,c-1)===1)){
    mat1.setItem(r-1,c,1)
    addTop(mat1,r-1,c)
    }
    //左下角、右下角
    if(mat1.getItem(r+1,c)!==1&&(mat1.getItem(r+1,c+1)===1||mat1.getItem(r+1,c-1)===1)){
    mat1.setItem(r+1,c,1)
    addTop(mat1,r+1,c)
    }
    if(mat1.getItem(r,c-1)!==1&&(mat1.getItem(r-1,c-1)===1||mat1.getItem(r+1,c-1)===1)){
    mat1.setItem(r,c-1,1)
    addTop(mat1,r,c-1)
    }
    if(mat1.getItem(r,c+1)!==1&&(mat1.getItem(r+1,c+1)===1||mat1.getItem(r-1,c+1)===1)){
    mat1.setItem(r,c+1,1)
    addTop(mat1,r,c+1)
    }
    }
    addTop(mat1,r,c);
    }
    //根据左上角,找出矩形的宽高
    function findConner(mat1,r,c){
    let w=1,h=1;
    while (mat1.getItem(r,c+w)===1){
    w=w+1;
    }
    while (mat1.getItem(r+h,c)===1){
    h=h+1;
    }

    return {
    r,c,w,h
    }
    }
    //判断是否相近
    function isNearRect(rect1,rect2) {
    const y1=rect1.r+rect1.h/2;
    const x1=rect1.c+rect1.w/2;
    const y2=rect2.r+rect2.h/2;
    const x2=rect2.c+rect2.w/2;
    const dis1=Math.abs(x2-x1)-(rect1.w/2+rect2.w/2)
    const dis2=Math.abs(y2-y1)-(rect1.h/2+rect2.h/2)

    if(dis1<0&&dis2>0){
    return dis2<Math.max(rect1.h,rect2.h)/10;
    }else if(dis1>0&&dis2<0){
    return dis1<Math.max(rect1.w,rect2.w)/20;
    }
    return 0;
    }
    //联合矩阵
    function unite(rect1,rect2){
    const r=Math.min(rect1.r,rect2.r);
    const c=Math.min(rect1.c,rect2.c);
    const w=Math.max(rect1.c+rect1.w,rect2.c+rect2.w)-c;
    const h=Math.max(rect1.r+rect1.h,rect2.r+rect2.h)-r;
    return {
    r,c,w,h
    }
    }
    //根据rect切割矩阵
    async function init() {
    const pixels=await getPixelsSync('3.jpg');
    console.log(pixels)
    const [w,h]=pixels.shape;

    //1定义矩阵
    const mat1=new Matrix([],h,w);
    mat1.rowMap(function (item,r,c) {
    return getColor(c,r,pixels);
    })
    sortMatColor(mat1);
    const mat2=mat1.clone()
    //填充图片为矩形
    mat1.rowEach(function (item,r,c) {
    if(item===1){
    addOne(mat1,r,c)
    }
    })
    //找出矩形
    let arr1=[]
    mat1.rowEach(function (item,r,c) {
    //左上
    if(item===1&&mat1.getItem(r-1,c)!==1&&mat1.getItem(r,c-1)!==1){
    const rect=findConner(mat1,r,c)
    if(rect.w>4&&rect.h>4)
    arr1.push(rect)

    }
    })
    console.log(arr1)
    const arr3=[]
    const cache=[]
    for(let i=0;i<arr1.length-1;i++){
    const rect1=arr1[i];
    const temp=[rect1]
    for(let j=i+1;j<arr1.length;j++){
    const rect2=arr1[j];
    if(isNearRect(rect1,rect2)){
    if(cache.indexOf(rect2)==-1){
    if(cache.indexOf(rect1)==-1){
    cache.push(rect1)
    }
    cache.push(rect2)
    temp.push(rect2);
    }
    }
    }
    if(temp.length>1){
    arr3.push(temp)
    }
    }
    const arr5=arr1.filter(function (rect) {
    return cache.indexOf(rect)===-1
    })
    const arr4=arr3.map(function (arr) {
    return arr.reduce(function (rect1,rect2) {
    return unite(rect1,rect2)
    })
    })
    arr1=arr5.concat(arr4)
    //矩阵数据
    const arr2=arr1.map(function (rect) {
    return mat2.cut(rect)
    })

    arr2.forEach(function (mat,i) {
    fs.writeFileSync('dist/'+i+'.txt',mat.toString())
    })

    return mat1;
    }
    init();

    // [ { r: 212, c: 41, w: 78, h: 80 },
    // { r: 213, c: 128, w: 80, h: 78 },
    // { r: 213, c: 306, w: 77, h: 79 },
    // { r: 213, c: 394, w: 79, h: 80 },
    // { r: 214, c: 216, w: 80, h: 79 },
    // { r: 316, c: 51, w: 69, h: 79 },
    // { r: 316, c: 222, w: 69, h: 18 },
    // { r: 317, c: 308, w: 75, h: 36 },
    // { r: 318, c: 398, w: 71, h: 77 },
    // { r: 319, c: 129, w: 78, h: 77 },
    // { r: 330, c: 40, w: 9, h: 34 },
    // { r: 338, c: 216, w: 77, h: 58 },
    // { r: 357, c: 309, w: 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0,0,0,0,0,0,0,0,0,0,2,2,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,1,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,1,1,1,1,1,1,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    ]

    原图

    
    
    
  • 相关阅读:
    并查集
    结构体字节对齐
    Dijkstra算法(单源最短路径)
    图的遍历
    二叉树的非递归遍历
    浅谈C语言中的联合体
    二叉排序(查找)树
    KMP算法
    C语言文件操作解析(四)
    Trie树
  • 原文地址:https://www.cnblogs.com/caoke/p/11098600.html
Copyright © 2011-2022 走看看