【JAVA】OPENGL+TIFF格式图片,不同阈值旋转效果

news2024/10/2 14:22:33

有些科学研究领域会用到一些TIFF格式图片,由于是多张图片相互渐变,看起来比较有意思:

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.*;

/**
 * 可以自已定义日志打印格式,这样看起来比较方便些
 *
 */
class MyFormatter extends Formatter
{
    @Override
    public String format(LogRecord arg0)
    {
        //创建StringBuilder对象来存放后续需要打印的日志内容
        StringBuilder builder = new StringBuilder();

        //获取时间
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS");
        Date now = new Date();
        String dateStr = simpleDateFormat.format(now);

        builder.append("[");
        builder.append(dateStr);
        builder.append(" ");

        //拼接日志级别
        builder.append(arg0.getLevel()).append(" ");

        builder.append(arg0.getSourceClassName()).append(" ");

        //拼接方法名
        builder.append(arg0.getSourceMethodName()).append(" ");

        StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
        String line = stackTrace[8].toString();
        String lineNumber = line.substring(line.indexOf(":") + 1, line.length() - 1);

        //拼接方法名
        builder.append(lineNumber).append("] ");

        //拼接日志内容
        builder.append(arg0.getMessage());

        //日志换行
        builder.append("\r\n");

        return builder.toString();
    }
}

public class MyLogger {
    static Logger logger;

    static  {
        logger = Logger.getLogger(MyLogger.class.getName());
        logger.setUseParentHandlers(false);
        //如果需要将日志文件写到文件系统中,需要创建一个FileHandler对象
        Handler consoleHandler = new ConsoleHandler();

        //创建日志格式文件:本次采用自定义的Formatter
        consoleHandler.setFormatter(new MyFormatter());

        //将FileHandler对象添加到Logger对象中
        logger.addHandler(consoleHandler);
    }

    public static Logger getLogger() {
        return logger;
    }

    public static void main(String[] args) {
        MyLogger.logger.info("1");
        Logger logger = MyLogger.logger;
        logger.info("2");
    }
}

import com.sun.media.jai.codec.*;

import com.sun.media.jai.codec.FileSeekableStream;
import com.sun.media.jai.codec.ImageDecoder;
import com.sun.media.jai.codec.ImageCodec;
import com.sun.media.jai.codec.TIFFEncodeParam;
import com.sun.media.jai.codec.TIFFDecodeParam;
import com.sun.media.jai.codec.JPEGEncodeParam;
import java.awt.image.RenderedImage;
import javax.media.jai.RenderedOp;
import javax.media.jai.JAI;

import java.awt.*;
import java.awt.image.DataBuffer;
import java.awt.image.RenderedImage;
import java.awt.image.renderable.ParameterBlock;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import javax.swing.*;

//本类继承自画布类,用作绘图的面板,因为Java不允许多继承,所以要用此类
class TIFBase extends Canvas
{
    ImageDecoder dec;

    TIFBase() throws IOException {
        this.TifRead();
    }
    public void TifRead() throws IOException
    {
        String currentDir = System.getProperty("user.dir");
        System.out.println("当前目录:" + currentDir);
        //FileSeekableStream fileSeekableStream = new FileSeekableStream("human_brain_from_itk_example.tif");
        FileSeekableStream fileSeekableStream = new FileSeekableStream("ex_Repo_hb9_eve1.tif");
        TIFFDecodeParam param0 = null;
        TIFFEncodeParam param = new TIFFEncodeParam();
        JPEGEncodeParam param1 = new JPEGEncodeParam();
        dec = ImageCodec.createImageDecoder("tiff", fileSeekableStream, param0);
        param.setCompression(TIFFEncodeParam.COMPRESSION_GROUP4);
        param.setLittleEndian(false); // Intel
    }

    public ImageDecoder getDec() {
        return dec;
    }

    public void setDec(ImageDecoder dec) {
        this.dec = dec;
    }

    public void TifDisplay(Graphics g) throws IOException, InterruptedException
    {
        int pagesCount = dec.getNumPages();
        System.out.println("This TIF has " + pagesCount + " image(s)");
        System.out.println();
        for (int i = 0; i < pagesCount; i++)
        {
            System.out.println("image: " + i);
            RenderedImage page = dec.decodeAsRenderedImage(i);
            DataBuffer dataBuffer = page.getData().getDataBuffer();

            //System.out.println("size: " + dataBuffer.getSize());
            int height = page.getHeight();
            int width = page.getWidth();
            //g.drawString(page.getData().toString(), 0, 0);
            for (int j = 0; j < height; j++)
            {
                for (int k = 0; k < width; k++)
                {
                    int red = dataBuffer.getElem((j * width + k) * 3);
                    int green = dataBuffer.getElem((j * width + k) * 3 + 1);
                    int blue = dataBuffer.getElem((j * width + k) * 3 + 2);
                    g.setColor(new Color(red, green, blue));
                    g.drawOval(j, k, 1, 1);
                }
            }
        }
        //Thread.sleep(10);
    }

    public void TifDisplay2(Graphics g) throws IOException, InterruptedException {
        int pagesCount = dec.getNumPages();
        System.out.println("This TIF has " + pagesCount + " image(s)");
        System.out.println();
        DataBuffer[] dataBuffers = new DataBuffer[pagesCount];
        int height = 0;
        int width = 0;
        for (int i = 0; i < pagesCount; i++)
        {
            //System.out.println("image: " + i);
            RenderedImage page = dec.decodeAsRenderedImage(i);
            //System.out.println("height: " + page.getHeight() + ", width: " + page.getWidth());
            height = page.getHeight();
            width = page.getWidth();
            dataBuffers[i] = page.getData().getDataBuffer();
        }

        int statPage = 0;
        int endPage = pagesCount;
        int gap = endPage - statPage;
        int miniColor = 3;
        for (int i = 0; i < height; i++)
        {
            for (int j = 0; j < width; j++)
            {
                int redSumary = 0;
                int greenSumary = 0;
                int blueSumary = 0;
                int validRedColorFlag = 0;
                int validGreenColorFlag = 0;
                int validBlueColorFlag = 0;
                for (int k = statPage; k < endPage; k++)
                {
                    int red = dataBuffers[k].getElem((i * width + j) * 3);
                    int green = dataBuffers[k].getElem((i * width + j) * 3 + 1);
                    int blue = dataBuffers[k].getElem((i * width + j) * 3 + 2);
                    if (red > miniColor)

                    {
                        redSumary += red;
                        validRedColorFlag++;
                    }
                    if (green > miniColor)
                    {
                        greenSumary += green;
                        validGreenColorFlag++;
                    }

                    if (blue > miniColor)
                    {
                        blueSumary += blue;
                        validBlueColorFlag++;
                    }
                }

                redSumary = (validRedColorFlag == 0) ? 0 : (redSumary / validRedColorFlag);
                greenSumary = (validGreenColorFlag == 0) ? 0 : (greenSumary / validGreenColorFlag);
                blueSumary = (validBlueColorFlag == 0) ? 0 : (blueSumary / validBlueColorFlag);

                g.setColor(new Color(redSumary, greenSumary, blueSumary));
                g.drawOval(i, j, 1, 1);
            }
        }
    }

    // 把窗口拉宽些就可。
    public void paint(Graphics g)
    {
        System.out.println("1");
        try {
            this.TifDisplay(g);
            //this.TifDisplay2(g);
        }
        catch (IOException | InterruptedException e)
        {
            throw new RuntimeException(e);
        }
    }
}

public class TIF extends JFrame
{
    public TIF()
    {
        super("画直线");
        this.setVisible(true);
        this.setBounds(200, 200, 600, 600);
    }

    public void Display() throws IOException
    {
        //创建对象
        TIFBase tifBase = new TIFBase();//创建实例
        this.getContentPane().add(tifBase);
    }

    public static void main(String[] args) throws IOException
    {
        TIF tif = new TIF();
        tif.Display();
    }
}

import com.sun.media.jai.codec.ImageDecoder;
import org.lwjgl.*;
import org.lwjgl.glfw.*;
import org.lwjgl.opengl.*;
import org.lwjgl.system.*;

import java.awt.*;
import java.awt.image.DataBuffer;
import java.awt.image.RenderedImage;
import java.io.IOException;
import java.nio.*;
import java.util.Objects;
import java.util.logging.Logger;

import static org.lwjgl.glfw.Callbacks.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL32.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;

public class HelloWorld {

    // The window handle
    private long window;
    public static Logger logger = MyLogger.logger;
    private float angle;

    private ImageDecoder dec;
    private int threshold;

    HelloWorld()  {

        //创建对象
        try {
            TIFBase tifBase = new TIFBase();//创建实例
            dec = tifBase.getDec();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public void run()
    {
        logger.info("Hello LWJGL " + Version.getVersion() + "!");

        init();
        loop();
        // Free the window callbacks and destroy the window
        glfwFreeCallbacks(window);
        glfwDestroyWindow(window);

        // Terminate GLFW and free the error callback
        glfwTerminate();
        Objects.requireNonNull(glfwSetErrorCallback(null)).free();
    }

    private void init() {
        logger.info("init");
        // Setup an error callback. The default implementation
        // will print the error message in System.err.
        GLFWErrorCallback.createPrint(System.err).set();

        angle = 5;
        threshold = 20;

        // Initialize GLFW. Most GLFW functions will not work before doing this.
        if ( !glfwInit() )
            throw new IllegalStateException("Unable to initialize GLFW");

        // Configure GLFW
        glfwDefaultWindowHints(); // optional, the current window hints are already the default
        glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); // the window will stay hidden after creation
        glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // the window will be resizable

        // Create the window
        window = glfwCreateWindow(600, 600, "Hello World!", NULL, NULL);
        if ( window == NULL )
            throw new RuntimeException("Failed to create the GLFW window");

        // Setup a key callback. It will be called every time a key is pressed, repeated or released.
        glfwSetKeyCallback(window, (window, key, scancode, action, mods) -> {
            if ( key == GLFW_KEY_ESCAPE && action == GLFW_RELEASE )
                glfwSetWindowShouldClose(window, true); // We will detect this in the rendering loop
        });

        // Get the thread stack and push a new frame
        try ( MemoryStack stack = stackPush() ) {
            IntBuffer pWidth = stack.mallocInt(1); // int*
            IntBuffer pHeight = stack.mallocInt(1); // int*

            // Get the window size passed to glfwCreateWindow
            glfwGetWindowSize(window, pWidth, pHeight);

            // Get the resolution of the primary monitor
            GLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor());

            // Center the window
            glfwSetWindowPos(
                    window,
                    (vidmode.width() - pWidth.get(0)) / 2,
                    (vidmode.height() - pHeight.get(0)) / 2
            );
        } // the stack frame is popped automatically

        // Make the OpenGL context current
        glfwMakeContextCurrent(window);
        // Enable v-sync
        glfwSwapInterval(1);

        // Make the window visible
        glfwShowWindow(window);
    }

    /**
     * 绘制三角形
     */
    public void DrawTriangles()
    {
        glTranslatef(-0.5f, -0.5f, -0.00f); //平移矩阵
        glRotatef(angle, 0.5f, 0.5f, 0.0f); //绕X,Y, Z轴直线旋转XX度
        glPointSize(1.0f);
        glBegin(GL_POINTS);

        try {
            int pagesCount = dec.getNumPages();
            //System.out.println("This TIF has " + pagesCount + " image(s)");
            //System.out.println();
            for (int i = 0; i < pagesCount; i++)
            {
                //System.out.println("image: " + i);
                RenderedImage page = dec.decodeAsRenderedImage(i);
                DataBuffer dataBuffer = page.getData().getDataBuffer();

                //System.out.println("size: " + dataBuffer.getSize());
                int height = page.getHeight();
                int width = page.getWidth();
                //g.drawString(page.getData().toString(), 0, 0);
                for (int j = 0; j < height; j++)
                {
                    for (int k = 0; k < width; k++)
                    {
                        int red = dataBuffer.getElem((j * width + k) * 3);
                        int green = dataBuffer.getElem((j * width + k) * 3 + 1);
                        int blue = dataBuffer.getElem((j * width + k) * 3 + 2);
                        //g.setColor(new Color(red, green, blue));
                        //System.out.println("red: " + red + ", green: " + green + ", blue: " + blue);
                        if (red > threshold )
                        {
                            glColor3b((byte) red, (byte) 0, (byte) 0);
                            glVertex3f(k / 200.0f,j / 200.0f,i / 200.0f);
                        }
                        if (green > threshold )
                        {
                            glColor3b((byte) 0, (byte) green, (byte) 0);
                            glVertex3f(k / 200.0f,j / 200.0f,i / 200.0f);
                        }
                        if (blue > threshold )
                        {
                            glColor3b((byte) 0, (byte) 0, (byte) blue);
                            glVertex3f(k / 200.0f,j / 200.0f,i / 200.0f);
                        }
                        //g.drawOval(j, k, 1, 1);
                    }
                }
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        System.out.println("threshold: " + threshold  + ", angle: " + angle);
        if (angle >= 350)
        {
            angle = 0;
            threshold += 10;
        }
        angle+=10;
        glEnd();
    }

    public void DrawLines()
    {
        glBegin(GL_LINES);
        glVertex2i(0, 0);
        glVertex2i(0, 1);
        glEnd();
    }

    public void DrawQuads()
    {
        glBegin(GL_QUADS);

        //顶面
        glColor3f(0.0f, 1.0f, 0.0f);
        glVertex3f(1.0f, 1.0f, -1.0f);     //右上顶点
        glVertex3f(-1.0f, 1.0f, -1.0f);    //左上顶点
        glVertex3f(-1.0f, 1.0f, 1.0f);     //左下顶点
        glVertex3f(1.0f, 1.0f, 1.0f);      //右下顶点

        //底面
        glColor3f(1.0f, 0.5f, 0.0f);
        glVertex3f(1.0f, -1.0f, 1.0f);     //右上顶点
        glVertex3f(-1.0f, -1.0f, 1.0f);    //左上顶点
        glVertex3f(-1.0f, -1.0f, -1.0f);   //左下顶点
        glVertex3f(1.0f, -1.0f, -1.0f);    //右下顶点

        //前面
        glColor3f(1.0f, 0.0f, 0.0f);
        glVertex3f(1.0f, 1.0f, 1.0f);      //右上顶点
        glVertex3f(-1.0f, 1.0f, 1.0f);     //左上顶点
        glVertex3f(-1.0f, -1.0f, 1.0f);    //左下顶点
        glVertex3f(1.0f, -1.0f, 1.0f);     //右下顶点

        //后面
        glColor3f(1.0f, 1.0f, 0.0f);
        glVertex3f(1.0f, -1.0f, -1.0f);    //右上顶点
        glVertex3f(-1.0f, -1.0f, -1.0f);   //左上顶点
        glVertex3f(-1.0f, 1.0f, -1.0f);    //左下顶点
        glVertex3f(1.0f, 1.0f, -1.0f);     //右下顶点

        //左侧面
        glColor3f(0.0f, 0.0f, 1.0f);
        glVertex3f(-1.0f, 1.0f, 1.0f);     //右上顶点
        glVertex3f(-1.0f, 1.0f, -1.0f);    //左上顶点
        glVertex3f(-1.0f, -1.0f, -1.0f);   //左下顶点
        glVertex3f(-1.0f, -1.0f, 1.0f);     //右下顶点

        //右侧面
        glColor3f(1.0f, 0.0f, 1.0f);
        glVertex3f(1.0f, 1.0f, -1.0f);     //右上顶点
        glVertex3f(1.0f, 1.0f, 1.0f);      //左上顶点
        glVertex3f(1.0f, -1.0f, 1.0f);     //左下顶点
        glVertex3f(1.0f, -1.0f, -1.0f);    //右下顶点

        glEnd();
    }
    private void loop() {
        logger.info("loop");

        // This line is critical for LWJGL's interoperation with GLFW's
        // OpenGL context, or any context that is managed externally.
        // LWJGL detects the context that is current in the current thread,
        // creates the GLCapabilities instance and makes the OpenGL
        GL.createCapabilities();
        //DrawQuads();
        //-----------------------------------------
        //glLoadIdentity();   //重置当前的模型观察矩阵

        //————————————————
        //版权声明:本文为CSDN博主「贝勒里恩」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
        //原文链接:https://blog.csdn.net/Mr_robot_strange/article/details/123682686
        while (true)
        {
            //glClearColor(1.0f, 1.0f, 0.0f, 0.0f);
            glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //清除屏幕和深度缓存

            //-----------------------------------------
            glLoadIdentity();   //重置当前的模型观察矩阵

            //DrawLines();
            DrawTriangles();
            glfwSwapBuffers(window);
            glfwPollEvents();
        }

    }

    public static void main(String[] args) {
        logger.info("main");
        new HelloWorld().run();
    }

}

这上边的代码如果需要运行,需要依赖这些JAR包: 

运行效果如下:

TIFF格式图片文件不同阈值旋转_哔哩哔哩_bilibili

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1362333.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

C++多态性——(5)运算符重载(第二节)

归纳编程学习的感悟&#xff0c; 记录奋斗路上的点滴&#xff0c; 希望能帮到一样刻苦的你&#xff01; 如有不足欢迎指正&#xff01; 共同学习交流&#xff01; &#x1f30e;欢迎各位→点赞 &#x1f44d; 收藏⭐ 留言​&#x1f4dd; 身先才能率人&#xff0c;律己才能服人…

外包干了1个月,技术退步一大半。。。

先说一下自己的情况&#xff0c;本科生&#xff0c;19年通过校招进入广州某软件公司&#xff0c;干了接近4年的功能测试&#xff0c;今年年初&#xff0c;感觉自己不能够在这样下去了&#xff0c;长时间呆在一个舒适的环境会让一个人堕落!而我已经在一个企业干了四年的功能测试…

YOLOv5+混合注意力机制再涨4.3%,Transformer混合设计依旧可以卷

在工业生产过程中&#xff0c;由于低效率、不统一的评估、高成本以及缺乏实时数据&#xff0c;传统的手动检测焊接缺陷不再被应用。 为了解决表面贴装技术中焊接缺陷检测的低准确率、高误检率和计算成本问题&#xff0c;提出了一种新方法。该方法是一种专门针对焊接缺陷检测算法…

node:全局对象事件环buffer

node&#xff1a;全局对象&事件环&buffer 全局对象 exports/module/require/__dirname/__filename&#xff1a;这些是参数 global全局对象&#xff0c;挂载global上的 process process 进程&#xff0c;代码node服务都是跑在一个进程里面。进程和集群 process上常用属性…

适配最新微信小程序隐私协议开发指南

准备工作 小程序后台设置用户隐私保护指引&#xff0c;需要等待审核通过&#xff1a;设置-基本设置-服务内容声明-用户隐私保护指引 小程序的基础库版本从 2.32.3 开始支持&#xff0c;所以要选这之后的版本 在 app.json 中加上这个设置 “usePrivacyCheck”: true 具体步骤可以…

【方法】PPT设置密码后如何修改?

PowerPoint是我们日常和工作中经常用到的办公软件&#xff0c;有时候为了保护文件&#xff0c;还会设置密码&#xff0c;那设置密码后又想要修改密码&#xff0c;怎么操作呢&#xff1f;下面来看看PPT常用的两种密码是如何修改的。 1. “打开密码” 想要修改PPT的“打开密码”…

C++性能优化- perf 和火焰图的安装使用

工欲善其事必先利其器&#xff0c;要想做Linux下的程序性能优化&#xff0c;就得先知道当前性能的瓶颈在哪里。 这里主要介绍一下常用的工具&#xff1a;perf工具和火焰图的使用方法 本文中的命令都是自己在Ubuntu18.04系统上测试可用的&#xff0c;在其他系统可能会需要不同的…

64.Go整洁代码架构实践

文章目录 一、为什么要有代码架构二、好的代码架构是如何构建的1、整洁架构2、洋葱架构三、六边形架构4、COLA &#xff08;Clean Object-oriented and Layered Architecture&#xff09;架构 三、Go 代码架构实践1、目录设计2、Adapter 层 : 负责http路由或者rpc接口管理3、Ap…

关于谷歌Gemini大模型

2023年12月7日&#xff0c;谷歌AI宣布发布新一代基于Transformer架构的大模型Gemini。 Gemini的名字来源于双子座&#xff0c;象征着模型的双重性质&#xff1a; 一方面&#xff0c;它是一个强大的训练模型&#xff0c;可以在各种下游任务上进行微调&#xff0c;如文本摘要、机…

真空引水罐 虹吸抽水机 负压虹吸罐 农业灌溉工作原理动画介绍

​ 1&#xff1a;真空引水罐虹吸抽水机虹吸罐介绍 真空引水罐是一种水泵吸水设备&#xff0c;也被称为真空罐、吸水罐或自动引水装置。它是一个密封的罐体&#xff0c;被串联在泵前的吸水管上&#xff0c;能够使水泵的吸水口从负压吸水变为正压吸水。使用真空引水罐可以节省真…

[蓝桥 2023 ]三带一

问题描述 小蓝和小桥玩斗地主&#xff0c;小蓝只剩四张牌了&#xff0c;他想知道是否是“三带一”牌型。 所谓“三带一”牌型&#xff0c;即四张手牌中&#xff0c;有三张牌一样&#xff0c;另外一张不与其他牌相同&#xff0c;换种说法&#xff0c;四张手牌经过重新排列后&am…

前端结合MQTT实现连接 订阅发送信息等操作 VUE3

MQTT客户端下载 使用测试 在我之前文章中 MQTT下载基础使用 下面记录一下前端使用的话的操作 1.安装 npm i mqtt引入 import * as mqtt from "mqtt/dist/mqtt.min"; //VUE3 import mqtt from mqtt //VUE2 一、MQTT协议中的方法 Connect。等待与服务器建立连接…

体系化的进阶学习内容

UWA学堂&#xff1a;传播游戏行业的体系化的进阶学习内容。UWA学堂作为面向开发者的在线学习平台&#xff0c;目前已经上线272门课程&#xff0c;涵盖了3D引擎渲染、UI、逻辑代码等多个模块&#xff0c;拥有完整的学习体系&#xff0c;一直致力于为广大的开发者提供更丰富、更优…

线程同步及互斥锁

一、线程同步 1. 线程同步&#xff1a;即当有一个线程在对内存进行操作时&#xff0c;其他线程都不可以对这个内存地址进 行操作&#xff0c;直到该线程完成操作&#xff0c;其他线程才能对该内存地址进行操作&#xff0c;而其他线程则处 于等待状态。 2. 临界区是指访问某…

junit单元测试:使用@ParameterizedTest 和 @CsvSource注解简化单元测试方法

在平常的开发工作中&#xff0c;我们经常需要写单元测试。比如&#xff0c;我们有一个校验接口&#xff0c;可能会返回多种错误信息。我们可以针对这个接口&#xff0c;写多个单元测试方法&#xff0c;然后将其场景覆盖全。那么&#xff0c;怎么才能写一个测试方法&#xff0c;…

CSDN的Markdown编辑器使用教程

这里写自定义目录标题 欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题&#xff0c;有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants 创建一个自定义列表如何创建一个…

YOLOv5改进 | 2023 | SCConv空间和通道重构卷积(精细化检测,又轻量又提点)

一、本文介绍 本文给大家带来的改进内容是SCConv,即空间和通道重构卷积,是一种发布于2023.9月份的一个新的改进机制。它的核心创新在于能够同时处理图像的空间(形状、结构)和通道(色彩、深度)信息,这样的处理方式使得SCConv在分析图像时更加精细和高效。这种技术不仅适…

【Flink精讲】双流Join之Regular Join(即普通Join)

Regular Join 普通Join 通过条件关联两条实时数据流&#xff1a;动态表Join动态表支持Inner Join、Left Join、Right Join、Full Join。 1. Inner Join(Join)&#xff1a;只有两边数据流都关联上才输出[L,R] 2. Left Join(Left Outer Join)&#xff1a;只要左流有数据即输出[…

听GPT 讲Rust源代码--compiler(26)

File: rust/compiler/rustc_target/src/abi/call/mips.rs 在Rust源代码中的rust/compiler/rustc_target/src/abi/call/mips.rs文件是关于MIPS架构的函数调用ABI(Aplication Binary Interface)定义。ABI是编程语言与底层平台之间的接口规范&#xff0c;用于定义函数调用、参数传…

三英战吕布web3游戏项目启动全流程

项目是一个学习相关的很好的例子并且开源&#xff0c;原本的项目是连接goerli网络&#xff0c;但我把它修改为可连接ganache网络的项目了&#xff0c;更方便启动。 智能合约部分 进入文件 hardhat.config.js &#xff0c;增加一个钱包私钥 2.执行npm install 3.测试合约 npx ha…