gocator导出图片

想用3D扫描后的图片,但是系统自带的导出方法很麻烦,所以考虑通过sdk导出

首先需要设置点云亮度

 

这里是导出图片的关键代码

 case GoDataMessageType.SurfaceIntensity:
     {
         Debug.WriteLine("SurfaceIntensity  ");
         GoSurfaceIntensityMsg surfaceMsg = (GoSurfaceIntensityMsg)dataObj;
         long width = surfaceMsg.Width;
         long length = surfaceMsg.Length;
         long bufferSize = width * length;
         IntPtr bufferPointeri = surfaceMsg.Data;

         //Console.WriteLine("Surface Intensity received:");
         //Console.WriteLine(" Buffer width: {0}", width);
         //Console.WriteLine(" Buffer length: {0}", length);
         byte[] ranges = new byte[bufferSize];

         Marshal.Copy(bufferPointeri, ranges, 0, ranges.Length);

 

         Mat mat1 = new Mat((int)length, (int)width, MatType.CV_8UC1, bufferPointeri);

         //Mat mat = Cv2.ImDecode(ranges, ImreadModes.Grayscale);

         long UID = YitIdHelper.NextId();
         string GlueImageDir = LogsUtil.GetLogDir(LogsUtil.GlueImage);
         ImageFile = await FileHelper.SaveVisionImage1(mat1, GlueImageDir, $"Glue3Dimage_{gm.TireBarcode}_{UID}.png");

 
     }
     break;

using Camera3D.Models.Glue;
using Camera3D.Utils;
using FluentFTP;
using Google.Protobuf.WellKnownTypes;
using JHCamera3D.Helper.Python;
using JHCamera3D.Utils;

//using Intel.RealSense;
using LinkAsiaSmart.MyTask;
using Lmi3d.GoSdk;
using Lmi3d.GoSdk.Messages;
using OpenCvSharp;
using System.Collections;
using System.Drawing.Imaging;
using System.Threading;
using System.Windows.Forms;
using Yitter.IdGenerator;
using static Camera3D.Enum.LMI.ReceiveProfile;
using static Emgu.CV.WeChatQRCode;
using static Slapper.AutoMapper;

namespace Camera3D.Helper.TCP
{
    /// <summary>
    /// 
    /// </summary>
    public class Camera3DGlue
    {
        public delegate void OnDataType(KObject data);

        public static Camera3DGlue? Instance;

        public static bool isSaveDataToMySql = true;
        public static bool isGoLoad = false;
        public static bool isStart = false;
        public static bool isCanStatus = false;
        private static double TireInsideLength = 0;
        private static double EncoderResolution = 0;

        GoDataSet dataSet;
        static GoSystem system;
        static GoSensor sensor;
        static GoSurfaceGeneration surfacelength;

        public static Camera3DGlue GetInstance()
        {
            if (Instance == null)
            {
                Instance = new Camera3DGlue();
            }
            return Instance;
        }

        public bool GoLoad()//加载Gocator
        {
            string ip = SystemParams.Camera3D.LMI3DGlueCameraIP;                         // "192.168.1.10";
            uint SensorID = uint.Parse(SystemParams.Camera3D.LMI3DGlueCameraSensorID);   // "192.168.1.10";
            KApiLib.Construct();
            GoSdkLib.Construct();

            system = new GoSystem();
            dataSet = new GoDataSet();
            try
            {
                sensor = system.FindSensorById(SensorID);//指定传感器的ID连接 
                if (sensor.State == GoState.Running)
                {
                    sensor.Stop();
                    sensor.Disconnect();
                };
                sensor.Connect();

                //double encoder = sensor.Transform.EncoderResolution;
                EncoderResolution = sensor.Transform.EncoderResolution;
                TireInsideLength = sensor.Setup.GetSurfaceGeneration().FixedLengthLength;

                system.EnableData(true);//数据通道使能
                system.SetDataHandler(onData);//异步接受数据

                isGoLoad = true;
            }
            catch (Exception ex)
            {
                return false;
            }

            return true;
        }

        public static void Start()
        {
            try
            {
                if (sensor == null)
                {
                    return;
                }

                sensor.Stop();

                surfacelength = sensor.Setup.GetSurfaceGeneration();    

                sensor.Start();

                isStart = true;

                isCanStatus = true;
            }
            catch (Exception ex)
            {
                Log.Logger.Error($" 异常 {ex.Message}");
            }
        }

        public static void Stop()
        {
            try
            {
                sensor.Stop();

                isCanStatus = false;
            }
            catch (Exception ex)
            {
                Log.Logger.Error($"Sensor Stop 异常 {ex.Message}");
            }
        }
        public static GoState GetStatus()
        {
            GoState state = GoState.Offline;// new GoState();
                                            //  state = GoState.Offline;
            if (isCanStatus)
            {
                try
                {
                    state = sensor.State.Value;
                }
                catch (Exception ex)
                {
                    Log.Logger.Error($"  异常 {ex.Message}");
                }
            }
   
            return state;
        }


        public static async void onData(KObject data)
        {
            int mb = 1024 * 1024;
            Process currentProcess = Process.GetCurrentProcess();
            long workingSet = currentProcess.WorkingSet64;
            Log.Logger.Debug($" 占用内存{workingSet / mb}MB");

            Random rdm = new Random(Guid.NewGuid().GetHashCode());

            GlueModel gm = new GlueModel();
            gm.DateTime = DateUtil.CurrentDate.ToString();
            gm.TireBarcode = PLCTag.GetTagValue(TagNameDesc.GlueTireBarcode, TagValueType.String);  // Work.PLC.Glue.GetGlueTireBarcode();

            string PLYName = $"Glue_{gm.TireBarcode}_{YitIdHelper.NextId()}";
            string ImageFile = "";
            GlueCompensationModel gcm = new GlueCompensationModel();

            float GlueTireInnerCircumference = float.Parse(PLCTag.GetTagValue(TagNameDesc.GlueTireInnerCircumference, TagValueType.Float));   // Work.PLC.TagValue.GetGlueTireInnerCircumference();
 

            Log.Logger.Debug($"接受到 3D  数据  ");
            try
            {
                DataContext context = new DataContext(); 
                GoDataSet dataSet = (GoDataSet)data;

                for (UInt32 i = 0; i < dataSet.Count; i++)
                {
                    GoDataMsg dataObj = (GoDataMsg)dataSet.Get(i);

                    // Debug.WriteLine($"GoDataMsg.MessageType:{dataObj.MessageType}");
                    Log.Logger.Debug($" GoDataMsg.MessageType : {dataObj.MessageType}  ");
                    switch (dataObj.MessageType)
                    {
                        case GoDataMessageType.Stamp:
                            {
                                GoStampMsg stampMsg = (GoStampMsg)dataObj;
                                for (UInt32 j = 0; j < stampMsg.Count; j++)
                                {
                                    GoStamp stamp = stampMsg.Get(j);
                                    //Debug.WriteLine("Frame Index = {0}", stamp.FrameIndex);
                                    //Debug.WriteLine("Time Stamp = {0}", stamp.Timestamp);
                                    //Debug.WriteLine("Encoder Value = {0}", stamp.Encoder);
                                    // Debug.WriteLine($"{i} -{j}  Index = {stamp.FrameIndex} time =  {stamp.Timestamp} value = {stamp.Encoder}");
                                    //Debug.WriteLine($"  {stampMsg.Count}  ");
                                    // LsData.Add(stamp.Encoder.ToString());
                                }
                                //
                            }
                            break;

                        case GoDataMessageType.UniformSurface:
                            {
                                try
                                {
                                    GoUniformSurfaceMsg surfaceMsg = (GoUniformSurfaceMsg)dataObj;
                                    long width = surfaceMsg.Width; //被测物体宽度
                                    long length = surfaceMsg.Length; //3D相机走过的长度
                                    long bufferSize = (width * length);
                                    IntPtr bufferPointer = surfaceMsg.Data;

                                    //获取缓存的宽高
                                    long surfaceBufferWidth = surfaceMsg.Width;
                                    long surfaceBufferLength = surfaceMsg.Length;
                                    float[] x = new float[surfaceBufferLength * surfaceBufferWidth];
                                    float[] y = new float[surfaceBufferLength * surfaceBufferWidth];
                                    float[] z = new float[surfaceBufferLength * surfaceBufferWidth];
                                    // byte[] intensity = new byte[surfaceBufferLength * surfaceBufferWidth];

                                    SurfacePoint[] surfaceBuffer = new SurfacePoint[surfaceBufferLength * surfaceBufferWidth];
                                    List<SurfacePoint> ListSurface = new List<SurfacePoint>();

                                    short[] ranges = new short[bufferSize];
                                    Marshal.Copy(bufferPointer, ranges, 0, ranges.Length);

                                    // Marshal.Copy(bufferPointer, intensity, 0, ranges.Length);

                                    //string rangesStr = string.Join(",", ranges);
                                    Log.Logger.Debug($"Surface Width = {width} length = {length} bufferSize = {bufferSize} ");

                                    double xResolution = (double)surfaceMsg.XResolution / 1000000;
                                    double yResolution = (double)surfaceMsg.YResolution / 1000000;
                                    double zResolution = (double)surfaceMsg.ZResolution / 1000000;

                                   // YDotPitch = yResolution;

                                    context.xResolution = (float)surfaceMsg.XResolution / 1000000;
                                    context.yResolution = (float)surfaceMsg.YResolution / 1000000;
                                    context.zResolution = (float)surfaceMsg.ZResolution / 1000000;
                                    context.xOffset = (float)surfaceMsg.XOffset / 1000;
                                    context.yOffset = (float)surfaceMsg.YOffset / 1000;
                                    context.zOffset = (float)surfaceMsg.ZOffset / 1000;
                                    long surfacePointCount = surfaceMsg.Width * surfaceMsg.Length;

                                    for (int j = 0; j < length; j++)
                                    {
                                        for (int k = 0; k < width; k++)
                                        {
                                            y[width * j + k] = (float)(k * context.xResolution + context.xOffset);
                                            x[width * j + k] = (float)(j * context.yResolution + context.yOffset);
                                            short tmp = ranges[width * j + k];
                                            z[width * j + k] = tmp == -32768 ? -32768 : (float)(tmp * context.zResolution + context.zOffset);

                                            //  intensity[width * j + k]= context.
                                            //if (tmp == -32768)
                                            //{
                                            //    z[width * j + k] = -32768;
                                            //}
                                            //else
                                            //{
                                            //    z[width * j + k] = (float)(tmp * context.zResolution + context.zOffset);
                                            //}

                                            surfaceBuffer[width * j + k].x = x[width * j + k];
                                            surfaceBuffer[width * j + k].y = y[width * j + k];
                                            surfaceBuffer[width * j + k].z = z[width * j + k];
                                        }
                                    }

                                    //Mat mat = Cv2.ImDecode(intensity, ImreadModes.Color);

                                    //long UID = YitIdHelper.NextId();
                                    //FileHelper.SaveVisionImage1(mat, $"Glue3Dimage_{UID}.png");

                                    Log.Logger.Debug($"接收到相机点云数量 = {surfacePointCount} ");
                                    ListSurface = surfaceBuffer.Where(a => a.z >= -10000).ToList();
                                    //PointCloudUtil.SavePointCloudToPLY(No, x, y, z);
                                    string PLYFile = await PointCloudUtil.SavePointCloudToPLY(PLYName, ListSurface.ToArray(), LogsUtil.GluePLY);
                                    //PointCloudUtil.SavePointCloudToPLY(No, x, y, z);
                                    DateTime startTime = DateTime.Now;
                                    while (!File.Exists(PLYFile))
                                    {
                                        if (DateTime.Now - startTime > TimeSpan.FromSeconds(10))
                                        {
                                            break;
                                        }
                                        await Task.Delay(200);
                                    }
                                    if (File.Exists(PLYFile))
                                    {
                                        ProcessPLYGlueStrip(PLYFile, gcm);
                                    }
                                    else
                                    {
                                        Log.Logger.Error($" 未找到ply文件 {PLYFile}");
                                    }

                                    x = null;
                                    y = null;
                                    z = null;
                                    ranges = null;
                                    surfaceBuffer = null;
                                    ListSurface.Clear();
                                    ListSurface = null;
                                    bufferPointer = IntPtr.Zero;
                                }
                                catch (Exception e)
                                {
                                    Log.Logger.Error($" GoDataMessageType.Surface 数据处理异常 = {e.Message} {e.StackTrace} ");
                                }
                            }
                            break;


                        case GoDataMessageType.SurfacePointCloud:
                            {
                                GoSurfacePointCloudMsg surfaceMsg = (GoSurfacePointCloudMsg)dataObj;
                                context.xResolution = (double)surfaceMsg.XResolution / 1000000;
                                context.yResolution = (double)surfaceMsg.YResolution / 1000000;
                                context.zResolution = (double)surfaceMsg.ZResolution / 1000000;
                                context.xOffset = (double)surfaceMsg.XOffset / 1000;
                                context.yOffset = (double)surfaceMsg.YOffset / 1000;
                                context.zOffset = (double)surfaceMsg.ZOffset / 1000;
                                long surfacePointCount = surfaceMsg.Width * surfaceMsg.Length;
                                Console.WriteLine("Surface Point Cloud received:");
                                Console.WriteLine(" Buffer width: {0}", surfaceMsg.Width);
                                Console.WriteLine(" Buffer length: {0}", surfaceMsg.Length);
                                GoPoints[] points = new GoPoints[surfacePointCount];
                                SurfacePoint[] surfaceBuffer = new SurfacePoint[surfacePointCount];
                                int structSize = Marshal.SizeOf(typeof(GoPoints));
                                IntPtr pointsPtr = surfaceMsg.Data;
                                for (UInt32 array = 0; array < surfacePointCount; ++array)
                                {
                                    IntPtr incPtr = new IntPtr(pointsPtr.ToInt64() + array * structSize);
                                    points[array] = (GoPoints)Marshal.PtrToStructure(incPtr, typeof(GoPoints));
                                }
                                for (UInt32 arrayIndex = 0; arrayIndex < surfacePointCount; ++arrayIndex)
                                {
                                    if (points[arrayIndex].x != -32768)
                                    {
                                        surfaceBuffer[arrayIndex].x = context.xOffset + context.xResolution * points[arrayIndex].x;
                                        surfaceBuffer[arrayIndex].y = context.yOffset + context.yResolution * points[arrayIndex].y;
                                        surfaceBuffer[arrayIndex].z = context.zOffset + context.zResolution * points[arrayIndex].z;
                                    }
                                    else
                                    {
                                        surfaceBuffer[arrayIndex].x = -32768;
                                        surfaceBuffer[arrayIndex].y = -32768;
                                        surfaceBuffer[arrayIndex].z = -32768;
                                    }
                                }
                            }
                            break;

                        case GoDataMessageType.SurfaceIntensity:
                            {
                                Debug.WriteLine("SurfaceIntensity  ");
                                GoSurfaceIntensityMsg surfaceMsg = (GoSurfaceIntensityMsg)dataObj;
                                long width = surfaceMsg.Width;
                                long length = surfaceMsg.Length;
                                long bufferSize = width * length;
                                IntPtr bufferPointeri = surfaceMsg.Data;

                                //Console.WriteLine("Surface Intensity received:");
                                //Console.WriteLine(" Buffer width: {0}", width);
                                //Console.WriteLine(" Buffer length: {0}", length);
                                byte[] ranges = new byte[bufferSize];

                                Marshal.Copy(bufferPointeri, ranges, 0, ranges.Length);

   

                                Mat mat1 = new Mat((int)length, (int)width, MatType.CV_8UC1, bufferPointeri);

                                //Mat mat = Cv2.ImDecode(ranges, ImreadModes.Grayscale);

                                long UID = YitIdHelper.NextId();
                                string GlueImageDir = LogsUtil.GetLogDir(LogsUtil.GlueImage);
                                ImageFile = await FileHelper.SaveVisionImage1(mat1, GlueImageDir, $"Glue3Dimage_{gm.TireBarcode}_{UID}.png");
 
                            }
                            break;
                    }
                } 

                Log.Logger.Debug($"完成3D相机的数据"); 
 
                Download3DImage(ImageFile);
            }
            catch (Exception ex)
            {
                Log.Logger.Error($"Camera3D  Error {ex.Message}");
            }

            GlobalConst.Common.SharedLock = false;

            workingSet = currentProcess.WorkingSet64;
            Log.Logger.Debug($"接收3D相机数据后 占用内存{workingSet / mb}MB");
        }

        public float GetLength()
        {
            return (float)TireInsideLength;
        }

        public string SetLength(double length)
        {
            string result = "";
            try
            {
                Stop();
                surfacelength = sensor.Setup.GetSurfaceGeneration();
                //surfacelength.FixedLengthTriggerExternalInputIndex = length;
                surfacelength.FixedLengthLength = length;

                Log.Logger.Debug($"设置 3D相机触发轮胎内周长 PLC = [{length}] OK");
                Start();
                result = "OK";
                TireInsideLength = length;
            }
            catch (Exception ex)
            {
                result = "ERROR";
                Log.Logger.Error($"设置 3D相机触发长度异常 {ex.Message}");
            }
            return result;
        }

        public string SetEncoderResolution(double value)
        {
            string result = "";
            if (value <= 0)
            {
                return result;
            }
            try
            {
                Stop();
                // sensor.Setup.EncoderSpacing = value;
                sensor.Transform.EncoderResolution = value;
                Log.Logger.Debug($"设置 3D相机分辨率OK {value}");
                Start();
                result = "OK";
            }
            catch (Exception ex)
            {
                result = "ERROR";
                Log.Logger.Error($"设置 3D相机分辨率异常 value={value} msg={ex.Message}");
            }
            return result;
        }

        public string GetEncoder()
        {
            string result = "";
            try
            {
                if (isCanStatus)
                {
                    if (sensor.State.Value == GoState.Running)
                    {
                        result = sensor.Encoder().ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Logger.Error($"读取 3D相机编码器数值异常 value = {result} {sensor.State} msg = {ex.Message}");
            }
            return result;
        } 

        public static string Download3DImage(string ImageFile)
        {
            string result = "";
            Task.Run(async () =>
            { 
                try
                {
 

                    EncoderResolution = sensor.Transform.EncoderResolution;
                    TireInsideLength = sensor.Setup.GetSurfaceGeneration().FixedLengthLength;
 
                    result = "OK";


                    string JPGImageFile = await ConvertToJPG(ImageFile);

                    SignalRClient.GetInstance().SendMsg(GlobalConst.SignalRUser.Glue.Camera3DGlueImage, JPGImageFile); 
                }
                catch (Exception ex)
                {
                    Log.Logger.Error($" 3D相机 图片出现异常 {ex.Message}");
                    result = "Error";
                }
            });
            return result;
        }

        public static async Task<string> ConvertToJPG(string ImageFile)
        {
            DateTime startTime = DateTime.Now;
            while (!File.Exists(ImageFile))
            {
                if (DateTime.Now - startTime > TimeSpan.FromSeconds(10))
                {
                    break;
                }
                await Task.Delay(200);
            }
            Log.Logger.Debug($"PNG转JPG文件 [{ImageFile}]");
            string extension = Path.GetExtension(ImageFile);
            Log.Logger.Debug($"PNG转JPG文件 [{extension}]");
            string JpgImageFile = ImageFile.Replace(extension, ".jpg");
            //string result = "";
            //int x = 0;
            await Task.Run(async () =>
            {
                try
                {
                    using (Image image = Image.FromFile(ImageFile))
                    {
                        image.Save(JpgImageFile, ImageFormat.Jpeg);
                    }
                }
                catch (Exception ex)
                {
                    Log.Logger.Error($"PNG转JPG异常 {ex.Message}");
                    // result = "Error";
                }
            });
            return JpgImageFile;
        }

 

        public static async Task<string> ProcessPLYGlueStrip(string PLYFile, GlueCompensationModel gcm)
        {
            string result = "";
            string No = "Glue" + DateUtil.CurrentDateID;
            string ScriptFile = AppSettingsHelper.Configuration["PythonScript:GlueScriptFile"];
            Log.Logger.Debug($" Open3D 测量  脚本 {ScriptFile}");
            string PlyResultDir = LogsUtil.GetLogDir(LogsUtil.GlueResultPLY);
            string str = RunPythonHelper.ExecPythonTireGlue(ScriptFile, PLYFile, PlyResultDir);
            Log.Logger.Debug($" Open3D 计算结果 {str}");

            string[] JsonStrResult = str.Split("~~");
            try
            {
                if (JsonStrResult[2].Trim().Length > 1)
                {
                    Log.Logger.Error($" errMsg = {JsonStrResult[2]}");
        
                }
                else
                {
                    GluePlyResultModel gprm = JsonConvert.DeserializeObject<GluePlyResultModel>(JsonStrResult[1]);
                    gprm.Barcode = PLCTag.GetTagValue(TagNameDesc.GlueTireBarcode, TagValueType.String); 
                    gprm.DateTime = DateUtil.CurrentDate.ToString();

                    gprm = GetCompensationResult(gprm, gcm);
                    string jsonStr = JsonConvert.SerializeObject(gprm);

                    SignalRClient.GetInstance().SendMsg(GlobalConst.SignalRUser.Glue.Glue3DResult, jsonStr);
           

   
                }
            }
            catch (Exception ex)
            {
                Log.Logger.Error($"处理 Open3D 计算结果异常 {ex.Message}");
              
            } 

            return result;
        }
 


    }
}

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

AI换脸原理(2)——人脸检测参考文献S3FD:源码解析

1 介绍 S3FD是一个实时人脸检测器,这篇论文的主要思想是试图解决一个常见的问题,即基于anchor(锚点)的检测器随着人脸变小而急剧恶化。 基于锚点的目标检测方法是通过对一系列预设锚点进行分类和回归来检测目标的,这些锚点是通过在图像上有规律地平铺一组不同尺度和宽高比…

凡尔码安全巡检卡替代传统纸质记录卡

建筑行业、物业管理、医院等行业的安全巡检的记录方式通常以&#xff1a;1、纸质记录&#xff1a;巡检人员使用纸质巡检表格&#xff0c;手动填写巡检时间、巡检区域、巡检发现的问题以及处理情况。这种方式简单直接&#xff0c;但可能存在信息记录不完整、易丢失等问题。 2、电…

rust打包编译为mac或者linux可执行文件,发送到别的电脑不能运行

如果使用rust项目编译为linux或者mac可执行文件&#xff0c;发送到别的电脑之后&#xff0c;不可以直接运行&#xff0c;而是显示一个空白文件&#xff0c;双击也没有反应&#xff0c;其实这是因为这个文件没有可执行权限导致的&#xff0c;添加可执行权限就可以了&#xff1a;…

用户至上!探索7种常用的用户体验研究方法

用户体验研究是产品开放过程中的重要组成部分&#xff0c;优秀的产品设计与高质量的用户体验是不可分割的。对于产品开发&#xff0c;选择合适的用户体验研究方法在很大程度上决定了产品的使用效果。本文全面阐述了用户体验研究、用户体验研究的重要性和用户体验研究方法&#…

Linux进程间通信:system V共享内存

目录 一、什么是共享内存 1.1创建共享内存 1.2释放共享内存 1.2.1shmctl 1.2.2shmat 1.2.3 shmdt 二、共享内存的实现及使用 2.1ShmClient 2.2Shm_Server 2.3Fifo.hpp 2.4Comm.hpp 一、什么是共享内存 标准系统V也叫system V的本地通信方式一般有三种&#xff1a; …

行业新应用:电机驱动将成为机器人的动力核心

电机已经遍布当今社会人们生活的方方面面&#xff0c;不仅应用范围越来越广&#xff0c;更新换代的速度也日益加快。按照工作电源分类&#xff0c;可以将它划分为直流电机和交流电机两大类型。直流电机中&#xff0c;按照线圈类型分类&#xff0c;又可以分为有铁芯的电机、空心…

Redis 哨兵机制

文章目录 哨兵机制概念相关知识铺垫主从复制缺陷哨兵工作流程选举具体流程理解注意事项 哨兵机制概念 先抽象的理解&#xff0c;哨兵就像是监工&#xff0c;节点不干活了&#xff0c;就要有行动了。 Redis 的主从复制模式下&#xff0c;⼀旦主节点由于故障不能提供服务&#…

视频高效批量剪辑,一站式按顺序合并视频并添加精彩片头片尾,瞬间提升视频品质

视频已成为传递信息、展示创意的最佳方式。但你是否也曾因为繁琐的剪辑工作而头痛不已&#xff1f;别担心&#xff0c;今天我们就来聊聊如何轻松实现视频的高效批量剪辑&#xff0c;让你的作品按顺序完美合并&#xff0c;同时增添上令人眼前一亮的片头片尾&#xff0c;让你的宣…

【Python图像分类系列】建立CNN模型实现猫狗图像分类(案例+源码)

这是我的第275篇原创文章。 一、引言 基于CNN卷积神经网络在图像识别领域的应用&#xff1a;猫狗图像识别。主要内容包含&#xff1a; 数据创建和预处理 神经网络模型搭建 神经网络模型的训练和拟合 文中使用的深度学习框架是Keras。部分数据展示&#xff1a; 猫&#xf…

65-CPLD电路设计(安路为例)

视频链接 CPLD电路设计&#xff08;安路为例&#xff09;01_哔哩哔哩_bilibili CPLD电路设计&#xff08;以安路为例&#xff09; 浅谈板级电源设计的三种方法_哔哩哔哩_bilibili 参考【浅谈板级电源设计的三种方法】 FPGA板级硬件实战S1&#xff5e;7课 实战Power2-电…

【linux-IMX6ULL配置GPIO通用流程-以及时钟配置】

目录 1. GPIO模式控制流程1.1 LED、蜂鸣器、按键1.2 GPIO控制流程 2. 标准库的简要分析及实现&#xff1a;2.1 问题引入&#xff1a;2.2 代码实现&#xff1a; 3. 时钟配置总结&#xff1a;3.1 时钟树概要&#xff1a;3.2 IMX6ULL时钟概要及时钟树&#xff1a;3.3 IMX6ULL时钟配…

[C/C++] -- 代理模式

代理模式是一种结构型设计模式&#xff0c;允许一个对象&#xff08;代理&#xff09;控制另一个对象的访问。代理对象通常充当客户端和实际目标对象之间的中间人&#xff0c;从而控制对目标对象的访问&#xff0c;可以在访问前后进行一些额外的处理。 代理模式的优点包括&…

Python通过定义类实现增删改查(期末考试)

python高级编程期末测试 别看我挣的少&#xff0c;但是我省的多&#xff0c;昨天法拉利又省下两百多万。 一、通过创建自己类来实现增删改查 我们已经利用模型实现单表的增删改查了 现在 我们不想使用模型来操作数据库 我们可以自己定义模型 那么 如何通过自己创建的类实现增…

商标注册证下证的前后时间的注意!

近日下了6个商标注册证&#xff0c;商标初审公告是3个月时间&#xff0c;如果没人提出异议&#xff0c;公告结束后1个月内基本上都可以拿到商标注册证电子版&#xff0c;没有纸制版的&#xff0c;凡是邮寄到付签收纸制商标注册证的基本都是骗。 对商标提出异议的主体平常会在公…

2024年03月 C/C++(二级)真题解析#中国电子学会#全国青少年软件编程等级考试

C/C编程&#xff08;1~8级&#xff09;全部真题・点这里 第1题&#xff1a;满足条件的数的累加2 现有n个整数&#xff0c;将其中个位数为k的数进行累加求和 输入 第一行一个整数n。第二行n个非负整数&#xff0c;以空格分割&#xff0c;每个数不大于100000。第三行一个整数k。 …

uniapp——列表分享当前话题(一个页面多个分享)

案例 分享的时候弹出对应的标题和默认第一张图片 代码 <view v-for"(item,index) in list" :key"index"><button open-type"share" :id"index" click.stop"()>{}"><image src"/static/images/cir…

多客陪玩系统源码APP小程序H5陪玩开发伴游源码游戏陪玩平台源码陪玩平台开发约单源码线下陪玩接单平台app小程序H5源码游戏陪玩app小程序H5开发

出售成品陪玩app小程序H5源码&#xff0c;免费搭建部署和售后服务&#xff0c;并提供源码二开、定制开发等相关服务。 一、陪玩app源码的功能介绍 1、语音聊天: 陪玩app小程序H5源码用户随时创建语音聊天室&#xff0c;实现多用户上麦功能&#xff0c;提高互动聊天体验。 2、游…

Apache SeaTunnel 4月回顾:明星贡献者与技术突破

各位热爱 SeaTunnel 的小伙伴们&#xff0c;SeaTunnel 社区 4 月份月报来啦&#xff01;这里将记录 SeaTunnel 社区每月的重要更新&#xff0c;欢迎关注&#xff01; 月度 Merge 之星 感谢以下小伙伴 4 月为 Apache SeaTunnel 做的精彩贡献&#xff08;排名不分先后&#xff…

02-单片机商业项目编程,从零搭建低功耗系统设计

一、本文内容 上一节《01-单片机商业项目编程&#xff0c;从零搭建低功耗系统设计-CSDN博客》已经对事件驱动原理有个基本了解&#xff0c;本节主要就是如何将事件写的更规范&#xff0c;而不是用t_flag这样的标记&#xff0c;写多了可读性也不强&#xff1b;本节结尾总结将提出…