Giter VIP home page Giter VIP logo

rtenhance-web's Introduction

RTEnhance

RTEnhance 是用于实时图像画面增强的简易API,主要致力于画面边缘强化

支持的功能

  • 实时图像质量增强

效果展示

  • 图像对比
处理前 处理后
origin process
- 高亮展示
Difference Highlight
Difference Highlight

使用

  1. 加载文件
    • 拷贝SDK目录(Web/Enhance/js/sdk/)下的文件到你的项目中
    copy "Web/Enhance/js/sdk/*.*" "YourProjectDirectory"
    • 链接JS文件, 先加载OpenCV.js
    <!-- other code -->
    <script src="YourProjectDirectory/opencv.js"></script>
    <script src="YourProjectDirectory/image_process.js"></script>
    <!-- other code -->
  2. 使用示例:
    • 增强一张图片并渲染到Canvas上
    let img_elm = document.getElementsByTagName("image")[0];
    let canvas_elm = document.getElementsByTagName("canvas")[0];
    //创建一个增强的程序 ImageEnhanceFrist 是最快速增强,增强效果相对比较弱
    let enhance_app = new ImageEnhanceFrist();
    // new ImageEnhanceDetails(); //更多细节的增强方式,速度较慢,但是会让图像细节更饱满,并且包含亮度重调整
    // new ImageEnhance(); //
    
    let src_img = cv.imread(img_elm);
    cv.cvtColor(src_img,src_img,cv.COLOR_RGBA2RGB);
    let dst_img = new cv.Mat();
    
    enhance_app.process(src_img,dst_img);
    cv.imshow(canvas_elm,dst_img);
    
    //使用完毕记得释放资源
    dst_img.delete();
    src_img.delete();
    enhance_app.delete();
    • 完整的示例可以查看Enhance/index.html

rtenhance-web's People

Contributors

jinwuzhu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.