C#數字圖像處理(二)

文章目錄

  • 1.灰度直方圖
    • 1.1 灰度直方圖定義
    • 1.2 灰度直方圖編程實例
  • 2.線性點運算
    • 2.1線性點運算定義
    • 2.2 線性點運算編程實例
  • 3.全等級直方圖灰度拉伸
    • 3.1 灰度拉伸定義
    • 3.2 灰度拉伸編程實例
  • 4.直方圖均衡化
    • 4.1 直方圖均衡化定義
    • 4.2 直方圖均衡化編程實例
  • 5.直方圖匹配
    • 5.1 直方圖匹配定義
    • 5.2 直方圖匹配編程實例
  • 6.附件鏈接
    • 6.1 解決VS2022 中沒有.net4.0
      • 6.1.1 解措施

1.灰度直方圖

??任何一幅圖像的直方圖都包括了可觀的信息,某些類型的圖像還可以由其直方圖完全描述。

1.1 灰度直方圖定義

在這里插入圖片描述
??灰度直方圖是灰度的函數,描述的是圖像中具有該灰度級的像素的個數。如果用直角坐標系來表示,則它的橫坐標是灰度級,縱坐標是該灰度出現的概率(像素的個數)。

1.2 灰度直方圖編程實例

在這里插入圖片描述
在這里插入圖片描述

private void histogram_Click(object sender, EventArgs e)
{if (curBitmap != null){histForm histoGram = new histForm(curBitmap);histoGram.ShowDialog();histoGram.Close();}
}

在這里插入圖片描述

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace histogram
{public partial class histForm : Form{//利用構造函數實現窗體之間的數據傳遞public histForm(Bitmap bmp){InitializeComponent();//把主窗體的圖像數據傳遞給從窗體bmpHist = bmp;//灰度級計數countPixel = new int[256];  //8位可表示256個灰度級}private void close_Click(object sender, EventArgs e){this.Close();}//圖像數據private System.Drawing.Bitmap bmpHist;//灰度等級private int[] countPixel;//記錄最大的灰度級個數private int maxPixel;/// <summary>/// 計算各個灰度級所具有的像素個數/// </summary>private void histForm_Load(object sender, EventArgs e){//鎖定8位灰度位圖Rectangle rect = new Rectangle(0, 0, bmpHist.Width, bmpHist.Height);System.Drawing.Imaging.BitmapData bmpData = bmpHist.LockBits(rect,System.Drawing.Imaging.ImageLockMode.ReadWrite, bmpHist.PixelFormat);IntPtr ptr = bmpData.Scan0;int bytes = bmpHist.Width * bmpHist.Height;byte[] grayValues = new byte[bytes];System.Runtime.InteropServices.Marshal.Copy(ptr, grayValues, 0, bytes);//灰度值數據存入grayValues中byte temp = 0;maxPixel = 0;//灰度等級數組清零Array.Clear(countPixel, 0, 256);//計算各個灰度級的像素個數for (int i = 0; i < bytes; i++){//灰度級temp = grayValues[i];//計數加1countPixel[temp]++;if (countPixel[temp] > maxPixel){//找到灰度頻率最大的像素數,用于繪制直方圖maxPixel = countPixel[temp];}}//解鎖System.Runtime.InteropServices.Marshal.Copy(grayValues, 0, ptr, bytes);bmpHist.UnlockBits(bmpData);}/// <summary>/// 繪制直方圖/// </summary>private void histForm_Paint(object sender, PaintEventArgs e){//獲取Graphics對象Graphics g = e.Graphics;//創建一個寬度為1的黑色鋼筆Pen curPen = new Pen(Brushes.Black, 1);//繪制坐標軸g.DrawLine(curPen, 50, 240, 320, 240);//橫坐標g.DrawLine(curPen, 50, 240, 50, 30);//縱坐標//繪制并標識坐標刻度g.DrawLine(curPen, 100, 240, 100, 242);g.DrawLine(curPen, 150, 240, 150, 242);g.DrawLine(curPen, 200, 240, 200, 242);g.DrawLine(curPen, 250, 240, 250, 242);g.DrawLine(curPen, 300, 240, 300, 242);g.DrawString("0", new Font("New Timer", 8), Brushes.Black, new PointF(46, 242));g.DrawString("50", new Font("New Timer", 8), Brushes.Black, new PointF(92,242));g.DrawString("100", new Font("New Timer", 8), Brushes.Black, new PointF(139, 242));g.DrawString("150", new Font("New Timer", 8), Brushes.Black, new PointF(189, 242));g.DrawString("200", new Font("New Timer", 8), Brushes.Black, new PointF(239, 242));g.DrawString("250", new Font("New Timer", 8), Brushes.Black, new PointF(289, 242));g.DrawLine(curPen, 48, 40, 50, 40);g.DrawString("0", new Font("New Timer", 8), Brushes.Black, new PointF(34, 234));g.DrawString(maxPixel.ToString(), new Font("New Timer", 8), Brushes.Black, new PointF(18, 34));//繪制直方圖double temp = 0;for (int i = 0; i < 256; i++){//縱坐標長度temp = 200.0 * countPixel[i] / maxPixel;g.DrawLine(curPen, 50 + i, 240, 50 + i, 240 - (int)temp);}//釋放對象curPen.Dispose();}}
}

在這里插入圖片描述

2.線性點運算

??灰度圖像的點運算可分為線性點運算和非線性點運算兩種。

2.1線性點運算定義

??線性點運算就是輸出灰度級與輸入灰度級呈線性關系的點運算。在這種情況下,灰度變換函數的形式為:

g(x, y)=pf(x,y)+L

??其中 f(x,y) 為輸入圖像在點 (x,y) 的灰度值, g(x,y) 為相應的輸出點的灰度值。顯然,如果P=1和L=0,g(x,y)就是f(x,y)的復制;如果P<1,輸出圖像的對比度將增大;如果P>1,則對比度將減少;如果P=1而L≠0,該操作僅使所有像素的灰度值上移或下移,其效果是使整個圖像在顯示時更暗或更亮;如果P為負值,暗區域將變亮,亮區域將變暗,該操作完成了圖像求補。

2.2 線性點運算編程實例

在這里插入圖片描述
在這里插入圖片描述

linearPOForm.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace histogram
{public partial class linearPOForm : Form{public linearPOForm(){InitializeComponent();}private void startLinear_Click(object sender, EventArgs e){//設置DialogResult屬性this.DialogResult = DialogResult.OK;}private void close_Click(object sender, EventArgs e){this.Close();}//設置兩個get訪問器public string GetScaling{get{//得到斜率return scaling.Text;}}public string GetOffset{get{//得到偏移量return offset.Text;}}}
}
Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace histogram
{public partial class Form1 : Form{public Form1(){InitializeComponent();}//文件名private string curFileName;//圖像對象private System.Drawing.Bitmap curBitmpap;/// <summary>/// 打開圖像文件/// </summary>private void open_Click(object sender, EventArgs e){//創建OpenFileDialogOpenFileDialog opnDlg = new OpenFileDialog();//為圖像選擇一個篩選器opnDlg.Filter = "所有圖像文件|*.bmp;*.pcx;*.png;*.jpg;*.gif;" +"*.tif;*.ico;*.dxf;*.cgm;*.cdr;*.wmf;*.eps;*.emf|" +"位圖(*.bmp;*.jpg;*.png;...)|*.bmp;*.pcx;*.png;*.jpg;*.gif;*.tif;*.ico|" +"矢量圖(*.wmf;*.eps;*.emf;...)|*.dxf;*.cgm;*.cdr;*.wmf;*.eps;*.emf";//設置對話框標題opnDlg.Title = "打開圖像文件";//啟用“幫助”按鈕opnDlg.ShowHelp = true;//如果結果為“打開”,選定文件if (opnDlg.ShowDialog() == DialogResult.OK){//讀取當前選中的文件名curFileName = opnDlg.FileName;//使用Image.FromFile創建圖像對象try{curBitmpap = (Bitmap)Image.FromFile(curFileName);}catch (Exception exp){MessageBox.Show(exp.Message);}}//對窗體進行重新繪制,這將強制執行paint事件處理程序Invalidate();}/// <summary>/// 在控件需要重新繪制時發生/// </summary>private void Form1_Paint(object sender, PaintEventArgs e){//獲取Graphics對象Graphics g = e.Graphics;if (curBitmpap != null){//使用DrawImage方法繪制圖像//160,20:顯示在主窗體內,圖像左上角的坐標//curBitmpap.Width, curBitmpap.Height圖像的寬度和高度g.DrawImage(curBitmpap, 160, 20, curBitmpap.Width, curBitmpap.Height);}}/// <summary>/// 關閉窗體 /// </summary>private void close_Click(object sender, EventArgs e){this.Close();}private void histogram_Click(object sender, EventArgs e){if (curBitmpap != null){//定義并實例化新窗體,并把圖像數據傳遞給它histForm histoGram = new histForm(curBitmpap);histoGram.ShowDialog();}}private void linearPO_Click(object sender, EventArgs e){if (curBitmpap!=null){//實例化linearPOForm窗體linearPOForm linearForm = new linearPOForm();//點擊確定按鈕if (linearForm.ShowDialog()==DialogResult.OK){Rectangle rect = new Rectangle(0, 0, curBitmpap.Width, curBitmpap.Height);System.Drawing.Imaging.BitmapData bmpData = curBitmpap.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadWrite, curBitmpap.PixelFormat);IntPtr ptr = bmpData.Scan0;int bytes = curBitmpap.Width * curBitmpap.Height;byte[] grayValues = new byte[bytes];System.Runtime.InteropServices.Marshal.Copy(ptr, grayValues, 0, bytes);int temp = 0;//得到斜率double a = Convert.ToDouble(linearForm.GetScaling);//得到偏移量double b = Convert.ToDouble(linearForm.GetOffset);for (int i = 0; i < bytes; i++){//根據公式計算線性點運算//加0.5表示四舍五入temp = (int)(a * grayValues[i] + b + 0.5);//灰度值限制在0~255之間//大于255,則為255;小于0則為0if (temp>255){grayValues[i] = 255;}else if (temp<0){grayValues[i] = 0;}else{grayValues[i] = (byte)temp;}}System.Runtime.InteropServices.Marshal.Copy(grayValues, 0, ptr, bytes);curBitmpap.UnlockBits(bmpData);}Invalidate();}}}
}

在這里插入圖片描述
在這里插入圖片描述

3.全等級直方圖灰度拉伸

??灰度拉伸也屬于線性點運算的一種,也可以通過上一節的程序得到。但由于它在點運算的特殊性,所以把它單獨列出來進行介紹。

3.1 灰度拉伸定義

??如果一幅圖像的灰度值分布在全等級灰度范圍內,即在0~255之間,那么它更容易被區別確認出來。
??灰度拉伸,也稱對比度拉伸,是一種簡單的線性點運算。它擴展圖像的直方圖,使其充滿整個灰度等級范圍內。
??設f(x,y)為輸入圖像,它的最小灰度級A和最大灰度級B的定義為:

A=min[f(x,y) B=max[f(x,y)]

??我們的目標是按照公式

  g(x, y)=pf(x,y)+L    

?? 把A和B分別線性映射到0和255,因此,最終的圖像g(x,y)為:
在這里插入圖片描述

3.2 灰度拉伸編程實例

 private void stretch_Click(object sender, EventArgs e){Stretch(curBitmpap, out curBitmpap);Invalidate();}/// <summary>/// 全等級灰度拉伸 (圖像增強)/// </summary>/// <param name="srcBmp">原圖像</param>/// <param name="dstBmp">處理后圖像</param>/// <returns>處理成功 true 失敗 false</returns>public static bool Stretch(Bitmap srcBmp, out Bitmap dstBmp){if (srcBmp == null){dstBmp = null;return false;}double pR = 0.0;//斜率double pG = 0.0;//斜率double pB = 0.0;//斜率byte minGrayDegree = 255;byte maxGrayDegree = 0;byte minGrayDegreeR = 255;byte maxGrayDegreeR = 0;byte minGrayDegreeG = 255;byte maxGrayDegreeG = 0;byte minGrayDegreeB = 255;byte maxGrayDegreeB = 0;dstBmp = new Bitmap(srcBmp);Rectangle rt = new Rectangle(0, 0, dstBmp.Width, dstBmp.Height);BitmapData bmpData = dstBmp.LockBits(rt, ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);unsafe{for (int i = 0; i < bmpData.Height; i++){byte* ptr = (byte*)bmpData.Scan0 + i * bmpData.Stride;for (int j = 0; j < bmpData.Width; j++){if (minGrayDegreeR > *(ptr + j * 3 + 2))minGrayDegreeR = *(ptr + j * 3 + 2);if (maxGrayDegreeR < *(ptr + j * 3 + 2))maxGrayDegreeR = *(ptr + j * 3 + 2);if (minGrayDegreeG > *(ptr + j * 3 + 1))minGrayDegreeG = *(ptr + j * 3 + 1);if (maxGrayDegreeG < *(ptr + j * 3 + 1))maxGrayDegreeG = *(ptr + j * 3 + 1);if (minGrayDegreeB > *(ptr + j * 3))minGrayDegreeB = *(ptr + j * 3);if (maxGrayDegreeB < *(ptr + j * 3))maxGrayDegreeB = *(ptr + j * 3);}}pR = 255.0 / (maxGrayDegreeR - minGrayDegreeR);pG = 255.0 / (maxGrayDegreeG - minGrayDegreeG);pB = 255.0 / (maxGrayDegreeB - minGrayDegreeB);for (int i = 0; i < bmpData.Height; i++){byte* ptr1 = (byte*)bmpData.Scan0 + i * bmpData.Stride;for (int j = 0; j < bmpData.Width; j++){*(ptr1 + j * 3) = (byte)((*(ptr1 + j * 3) - minGrayDegreeB) * pB + 0.5);*(ptr1 + j * 3 + 1) = (byte)((*(ptr1 + j * 3 + 1) - minGrayDegreeG) * pG + 0.5);*(ptr1 + j * 3 + 2) = (byte)((*(ptr1 + j * 3 + 2) - minGrayDegreeR) * pR + 0.5);}}}dstBmp.UnlockBits(bmpData);return true;}

在這里插入圖片描述
??增強后:
在這里插入圖片描述

4.直方圖均衡化

4.1 直方圖均衡化定義

??直方圖均衡化,又稱直方圖修平,它是一種很重要的非線性點運算。該方法通常用來增加圖像的局部對比度,尤其是當圖像的有用數據的對比度相當接近的時候。通過這種方法,亮度可以更好地在直方圖上分布。
??直方圖均衡化的基本思想,是把原始圖像的直方圖變換為均勻分布的形式,這樣就增加了像素灰度值的動態范圍,從而可達到增強圖像整體對比度的效果。
在這里插入圖片描述
在這里插入圖片描述

4.2 直方圖均衡化編程實例

在這里插入圖片描述
??為該控件添加Click事件,代碼如下:

 private void equalization_Click(object sender, EventArgs e){if (curBitmap != null){Rectangle rect = new Rectangle(0, 0, curBitmap.Width, curBitmap.Height);System.Drawing.Imaging.BitmapData bmpData = curBitmap.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadWrite, curBitmap.PixelFormat);IntPtr ptr = bmpData.Scan0;int bytes = curBitmap.Width * curBitmap.Height;byte[] grayValues = new byte[bytes];System.Runtime.InteropServices.Marshal.Copy(ptr, grayValues, 0, bytes);byte temp;int[] countPixel = new int[256];int[] tempArray = new int[256];//Array.Clear(tempArray, 0, 256);byte[] pixelMap = new byte[256];//計算各灰度級的像素個數for (int i = 0; i < bytes; i++){//灰度級temp = grayValues[i];//計數加1countPixel[temp]++;}for (int i = 0; i < 256; i++){if (i != 0){tempArray[i] = tempArray[i - 1] + countPixel[i];}else{tempArray[0] = countPixel[0];}pixelMap[i] = (byte)(255.0 * tempArray[i] / bytes + 0.5);}for (int i = 0; i < bytes; i++){temp = grayValues[i];grayValues[i] = pixelMap[temp];}System.Runtime.InteropServices.Marshal.Copy(grayValues, 0, ptr, bytes);curBitmap.UnlockBits(bmpData);Invalidate();}}

在這里插入圖片描述
在這里插入圖片描述

5.直方圖匹配

5.1 直方圖匹配定義

??直方圖匹配,又稱直方圖規定化,即變換原圖的直方圖為規定的某種形式的直方圖,從而使兩幅圖像具有類似的色調和反差。直方圖匹配屬于非線性點運算。
??直方圖規定化的原理:對兩個直方圖都做均衡化,變成相同的歸一化的均勻直方圖,以此均勻直方圖為媒介,再對參考圖像做均衡化的逆運算。
在這里插入圖片描述

5.2 直方圖匹配編程實例

在這里插入圖片描述

 private void shaping_Click(object sender, EventArgs e){if (curBitmap != null){shapingForm sForm = new shapingForm();if (sForm.ShowDialog() == DialogResult.OK){Rectangle rect = new Rectangle(0, 0, curBitmap.Width, curBitmap.Height);System.Drawing.Imaging.BitmapData bmpData = curBitmap.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadWrite, curBitmap.PixelFormat);IntPtr ptr = bmpData.Scan0;int bytes = curBitmap.Width * curBitmap.Height;byte[] grayValues = new byte[bytes];System.Runtime.InteropServices.Marshal.Copy(ptr, grayValues, 0, bytes);byte temp = 0;double[] PPixel = new double[256];double[] QPixel = new double[256];int[] qPixel = new int[256];int[] tempArray = new int[256];for (int i = 0; i < grayValues.Length; i++){temp = grayValues[i];qPixel[temp]++;}for (int i = 0; i < 256; i++){if (i != 0){tempArray[i] = tempArray[i - 1] + qPixel[i];}else{tempArray[0] = qPixel[0];}QPixel[i] = (double)tempArray[i] / (double)bytes;}PPixel = sForm.ApplicationP;double diffA, diffB;byte k = 0;byte[] mapPixel = new byte[256];for (int i = 0; i < 256; i++){diffB = 1;for (int j = k; j < 256; j++){diffA = Math.Abs(QPixel[i] - PPixel[j]);if (diffA - diffB < 1.0E-08){diffB = diffA;k = (byte)j;}else{k = (byte)(j - 1);break;}}if (k == 255){for (int l = i; l < 256; l++){mapPixel[l] = k;}break;}mapPixel[i] = k;}for (int i = 0; i < bytes; i++){temp = grayValues[i];grayValues[i] = mapPixel[temp];}System.Runtime.InteropServices.Marshal.Copy(grayValues, 0, ptr, bytes);curBitmap.UnlockBits(bmpData);}Invalidate();}}

在這里插入圖片描述

6.附件鏈接

6.1 解決VS2022 中沒有.net4.0

我們在安裝了最新的Visual Studio 2022,在單個組件中沒有 .net4.0或者.net4.5的問題。

6.1.1 解措施

通過nuget 下載 4.0 安裝包
下載地址: .NETFramework,Version=v4.0 的引用程序集
在這里插入圖片描述
得到安裝包.nupkg ,然后后綴名字,修改為.zip 解壓后
在這里插入圖片描述
將v4.0 復制到 C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework 直接替換文件
在這里插入圖片描述
然后我們重啟 vs2022,問題解決。
在這里插入圖片描述

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/907798.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/907798.shtml
英文地址,請注明出處:http://en.pswp.cn/news/907798.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

訓練中常見的運動強度分類

概述 有氧運動是耐力基礎&#xff0c;乳酸閾值是耐力突破的關鍵&#xff0c;提升乳酸閾值可以延緩疲勞&#xff0c;無氧運動側重速度和力量&#xff0c;混氧和最大攝氧量用于細化訓練強度和評估潛力。 分類強度供能系統乳酸濃度訓練目標有氧運動低&#xff08;60%-80% HR&…

數智管理學(十五)

第五章 數智化時代的組織結構模型 第一節 傳統金字塔型結構向分布式網絡型的演變 在當今數智化時代&#xff0c;企業所處的市場環境發生了翻天覆地的變化&#xff0c;技術創新日新月異&#xff0c;客戶需求日益多樣化和個性化&#xff0c;市場競爭愈發激烈。傳統的金字塔型組…

AAA基礎配置

文章目錄 組網需求組網拓撲實驗步驟測試結果配置文件 組網需求 為組網安全&#xff0c;經常會使用AAA技術&#xff0c;本次以CE12800交換機Window為例&#xff0c;實現AAA本地認證登錄 組網拓撲 實驗步驟 配置接口IP&#xff0c;連通終端進入AAA視圖配置用戶名密碼配置賬戶權…

基于微信小程序的云校園信息服務平臺設計與實現(源碼+定制+開發)云端校園服務系統開發 面向師生的校園事務小程序設計與實現 融合微信生態的智慧校園管理系統開發

博主介紹&#xff1a; ?我是阿龍&#xff0c;一名專注于Java技術領域的程序員&#xff0c;全網擁有10W粉絲。作為CSDN特邀作者、博客專家、新星計劃導師&#xff0c;我在計算機畢業設計開發方面積累了豐富的經驗。同時&#xff0c;我也是掘金、華為云、阿里云、InfoQ等平臺…

RV1126-OPENCV Mat理解和AT函數

一.Mat概念 Mat 是整個圖像存儲的核心也是所有圖像處理的最基礎的類&#xff0c;Mat 主要存儲圖像的矩陣類型&#xff0c;包括向量、矩陣、灰度或者彩色圖像等等。Mat由兩部分組成&#xff1a;矩陣頭&#xff0c;矩陣數據。矩陣頭是存儲圖像的長度、寬度、色彩信息等頭部信息&a…

23、Swift框架微調實戰(3)-Qwen2.5-VL-7B LORA微調OCR數據集

一、模型介紹 Qwen2.5-VL 是阿里通義千問團隊開源的視覺語言模型,具有3B、7B和72B三種不同規模,能夠識別常見物體、分析圖像中的文本、圖表等元素,并具備作為視覺Agent的能力。 Qwen2.5-VL 具備作為視覺Agent的能力,可以推理并動態使用工具,初步操作電腦和手機。在視頻處…

能按需拆分 PDF 為多個文檔的工具

軟件介紹 彩鳳 PDF 拆分精靈是一款具備 PDF 拆分功能的軟件。 功能特點 PDF 拆分功能較為常見&#xff0c;很多 PDF 軟件都具備&#xff0c;例如 DC 軟件提取 PDF 較為方便&#xff0c;但它不能從一個 PDF 里提取出多個 PDF。據印象&#xff0c;其他 PDF 軟件也似乎沒有能從…

Apache Kafka 實現原理深度解析:生產、存儲與消費全流程

Apache Kafka 實現原理深度解析&#xff1a;生產、存儲與消費全流程 引言 Apache Kafka 作為分布式流處理平臺的核心&#xff0c;其高吞吐、低延遲、持久化存儲的設計使其成為現代數據管道的事實標準。本文將從消息生產、持久化存儲、消息消費三個階段拆解 Kafka 的核心實現原…

【Vue 3全棧實戰】從組合式API到企業級架構設計

目錄 &#x1f31f; 前言&#x1f3d7;? 技術背景與價值&#x1fa79; 當前技術痛點&#x1f6e0;? 解決方案概述&#x1f465; 目標讀者說明 &#x1f9e0; 一、技術原理剖析&#x1f4ca; 核心概念圖解&#x1f4a1; 核心作用講解&#x1f527; 關鍵技術模塊說明?? 技術選…

支持功能安全ASIL-B的矩陣管理芯片IS32LT3365,助力ADB大燈系統輕松實現功能安全等級

隨著自動駕駛技術的快速發展&#xff0c;汽車前燈智能化也越來越高。自適應遠光燈 (ADB) 作為一種智能照明系統&#xff0c;在提升駕駛安全性和舒適性方面發揮著重要作用。ADB 系統通過攝像頭和傳感器獲取前方道路信息&#xff0c;例如來車的位置、距離和速度&#xff0c;并根據…

基于 Flickr30k-Entities 數據集 的 Phrase Localization

以下示例基于 Flickr30k-Entities 數據集中的標注&#xff0c;以及近期&#xff08;以 TransVG &#xff08;Li et al. 2021&#xff09;為例&#xff09;在短語定位&#xff08;Phrase Grounding&#xff09;任務上的評測結果&#xff0c;展示了單張圖片中若干名詞短語的定位情…

Java Spring Boot 自定義注解詳解與實踐

目錄 一、自定義注解的場景與優勢1.1 場景1.2 優勢 二、創建自定義注解2.1 定義注解2.2 創建注解處理器 三、使用自定義注解3.1 在業務方法上使用注解3.2 配置類加載注解 四、總結 在 Spring Boot 中&#xff0c;自定義注解為我們提供了一種靈活且強大的方式來簡化開發、增強代…

YOLOv5 環境配置指南

系統要求 Windows/Linux/MacOSNVIDIA GPU (推薦) 或 CPUPython 3.8CUDA 11.8 (如果使用 GPU) 安裝步驟 1. 安裝 Conda 如果還沒有安裝 Conda&#xff0c;請先從官網下載并安裝 Miniconda。 2. 創建虛擬環境 # 創建名為 yolov5 的新環境&#xff0c;使用 Python 3.8 conda…

標準精讀:2025 《可信數據空間 技術架構》【附全文閱讀】

《可信數據空間 技術架構》規范了可信數據空間的技術架構,明確其作為國家數據基礎設施的定位,以數字合約和使用控制技術為核心,涵蓋功能架構(含服務平臺與接入連接器的身份管理、目錄管理、數字合約管理等功能)、業務流程(登記、發現、創建空間及數據流通利用)及安全要求…

02.上帝之心算法用GPU計算提速50倍

本文介紹了上帝之心的算法及其Python實現&#xff0c;使用Python語言的性能分析工具測算性能瓶頸&#xff0c;將算法最耗時的部分重構至CUDA C語言在純GPU上運行&#xff0c;利用GPU核心更多并行更快的優勢顯著提高算法運算速度&#xff0c;實現了結果不變的情況下將耗時縮短五…

Elasticsearch的集群管理介紹

Elasticsearch 集群管理是確保分布式環境下系統穩定運行、高可用和高性能的關鍵。以下從集群架構、節點類型、故障轉移到監控優化,全面解析 Elasticsearch 集群管理的核心要點: 一、集群架構與節點類型 1. 基本概念 集群(Cluster):由一個或多個節點組成,共同存儲數據并…

高速串行接口

1.網口設計方案 上圖中給出了兩種網口設計方案&#xff0c;最上面是傳統設計方式&#xff0c;下面是利用GT作為PHY層的設計&#xff0c;然后FPGA中設計協議層和MAC層。 2.SRIO SRIO的本地操作和遠程操作 3.其他高速接口 srio rapid io aurora8b10b aurora64b66b pcie s…

第3節 Node.js 創建第一個應用

Node.js 非常強大&#xff0c;只需動手寫幾行代碼就可以構建出整個HTTP服務器。事實上&#xff0c;我們的Web應用以及對應的Web服務器基本上是一樣的。 在我們創建Node.js第一個"Hello, World!"應用前&#xff0c;讓我們先了解下Node.js應用是由哪幾部分組成的&…

ubuntu 安裝上傳的 ffmpeg_7.1.1.orig.tar.xz并使用

在 Ubuntu 上安裝并編譯上傳的 ffmpeg_7.1.1.orig.tar.xz 源碼包&#xff0c;請按照以下詳細步驟操作&#xff1a; 步驟 1&#xff1a;安裝編譯依賴 # 更新軟件包列表 sudo apt update# 安裝編譯工具和基礎依賴 sudo apt install -y build-essential autoconf automake cmake …

【Netty系列】核心概念

目錄 1. EventLoop 與線程模型 2. Channel&#xff08;通道&#xff09; 3. ChannelHandler 與 Pipeline 4. ByteBuf&#xff08;數據容器&#xff09; 5. Bootstrap 與 ServerBootstrap 6. Future 與 Promise 7. 其他核心概念 總結 Netty 是一個高性能、異步事件驅動的…