高通Camera点亮3——Camera Module
Camera点亮除了Sensor之外还需要配置module、EEPROM等,multicamera;配置好编译设置。
Module
<?xml version="1.0" encoding="utf-8" ?>
<cameraModuleData<!--Module group can contain either 1 module or 2 modulesDual camera, stereo camera use cases contain 2 modules in the group --><moduleGroup><!--Module configuration --><moduleConfiguration description="Module configuration"><!--CameraId is the id to which DTSI node is mapped.Typically CameraId is the slot Id for non combo mode. --><!--cameraId字段与Camera设备树中的配置的id需要保持一致,同时multicamera中的soltId也对应该值--><cameraId>6</cameraId><!--Name of the module integrator --><moduleName>united</moduleName><!--Name of the sensor in the image sensor module --><!--对应的Sensor名,与Sensor XML中定义需要一样--><sensorName>ov13b10</sensorName><!--Actuator name in the image sensor moduleThis is an optional element. Skip this element if actuator is not present --><!--马达名称,与文件中的定义需要对应一致--><actuatorName>dw9714v</actuatorName><!-- Element for actuatorSlaveAddress --><actuatorSlaveAddress>0x18</actuatorSlaveAddress><eepromName>p24c64e</eepromName><flashName>pmic</flashName><!--Chromatix name is used to used to open binary.Binary name is of the form sensor_model_chromatix.bin --><chromatixName>united_ov13b10</chromatixName><!--Position of the sensor module.Valid values are: REAR, FRONT, REAR_AUX, FRONT_AUX, EXTERNAL --><position>REAR</position><!--CSI Information --><CSIInfo description="CSI Information"><!--MIPI数据lane的分布--><laneAssign>0x3210</laneAssign><isComboMode>0</isComboMode></CSIInfo><!--Lens information --><lensInfo description="Lens Information"><!--Focal length of the lens in millimeters. --><focalLength>3.34</focalLength><!--F-Number of the optical system. --><fNumber>2.2</fNumber><!--Minimum focus distance in meters. --><minFocusDistance>0.1</minFocusDistance><!--Total focus distance in meters. --><maxFocusDistance>8.0</maxFocusDistance><!--Horizontal view angle in degrees. --><horizontalViewAngle>68.4</horizontalViewAngle><!--Vertical view angle in degrees. --><verticalViewAngle>53</verticalViewAngle><!--Maximum Roll Degree. Valid values are: 0 to 359 --><maxRollDegree>360</maxRollDegree><!--Maximum Pitch Degree. Valid values are: 0, 90, 180, 270 --><maxPitchDegree>360</maxPitchDegree><!--Maximum Yaw Degree. Valid values are: 0 to 359 --><maxYawDegree>360</maxYawDegree></lensInfo></moduleConfiguration></moduleGroup>
</cameraModuleData>
EEPROM
<?xml version="1.0" encoding="utf-8" ?>
<EEPROMDriverData<!--EEPROM slave informationelement for EEPROMNameelement for slaveAddresselemet for regAddrTypeelement for regDataTypeelement for I2CFrequencyModeelement for power up sequenceelement for power down sequence --><slaveInfo description="EEPROM Slave Information"><!--Name of the EEPROM device --><!--需要与module中配置的对应起来来--><EEPROMName>p24c64e_eeprom</EEPROMName><!--8-bit or 10-bit I2C slave Write address --><slaveAddress>0xa0</slaveAddress><!--Register address / data size in bytes --><regAddrType range="[1,4]">2</regAddrType><!--Register address / data size in bytes --><regDataType range="[1,4]">1</regDataType><!--I2C frequency mode of slaveSupported modes are: STANDARD (100 KHz), FAST (400 KHz), FAST_PLUS (1 MHz), CUSTOM (Custom frequency in DTSI) --><i2cFrequencyMode>FAST</i2cFrequencyMode><!--Sequence of power configuration type and configuration value required to control power to the device --><powerUpSequence><!--Power setting configurationContains: configType, configValue and delay in milli seconds --><powerSetting><!--Power configuration typeSupported types are: MCLK, VANA, VDIG, VIO, VAF, RESET, STANDBY --><configType>VIO</configType><!--Configuration value for the type of configuration --><configValue>0</configValue><!--Delay in milli seconds --><delayMs>0</delayMs></powerSetting></powerUpSequence><!--Sequence of power configuration type and configuration value required to control power to the device --><powerDownSequence><!--Power setting configurationContains: configType, configValue and delay in milli seconds --><powerSetting><!--Power configuration typeSupported types are: MCLK, VANA, VDIG, VIO, VAF, RESET, STANDBY --><configType>VIO</configType><!--Configuration value for the type of configuration --><configValue>0</configValue><!--Delay in milli seconds --><delayMs>0</delayMs></powerSetting></powerDownSequence></slaveInfo><!--Sequence of register settings to configure the device --><memoryMap><!--Register setting configurationContains: register address, register data, register address type, register data type,operation and delay in micro secondselement for slaveAddrelement for registerAddrelement for registerDataelement for regAddrTypeelement for regDataTypeelement for operationelement for delayUs --><regSetting><!--Slave address to communicate withe the device --><slaveAddr>0xa0</slaveAddr><!--Register address that is accessed --><registerAddr>0x0000</registerAddr><!--If operation is WRITE, registerData is the data value to be written into the specified register addressIf operation is READ, registerData is the number of bytes to be read from the specified register address --><!--这里为从EEPROM读取数据字节数,根据实际EEPROM中数据来填写--><registerData>0x0B04</registerData><!--Register address / data size in bytes --><regAddrType range="[1,4]">2</regAddrType><!--Register address / data size in bytes --><regDataType range="[1,4]">1</regDataType><!--Type of the operationValid values are: WRITE, READ, POLL --><operation>READ</operation><!--Delay in micro seconds. Delay is 0 if not explicitly provided --><delayUs>0</delayUs></regSetting></memoryMap><!--EEPROM data format informationelement for auto focus informationelement for white balance informationelement for lens shading informationelement for dual camera informationelement for shield pixel informationelement for PDAF DCC informationelement for pdaf 2D information --><formatInfo description="EEPROM Data Format Information"><!--Specifies auto focus data information to format the OTP dataelement for AF data availablity and endianelement for macro informationelement for infinity informationelement for hall informationelement for hall bias informationelement for vertical macro informationelement for vertical infinity informationelement for horizontal macro informationelement for horizontal infinityelement for macro margin value informationelement for infinity margin value --><AF><!--Specifies the availability of the specified data and type of endiannesselement for operation --><autoFocusData description="Memory Type"><!--Specifies whether a particular OTP data available or not --><isAvailable>true</isAvailable><!--Type of the EndiannessValid values are: BIG, LITTLE --><endianness>LITTLE</endianness></autoFocusData><!--Specifies memory offset value and mask information --><macro><!--Offset value in the OTP memory --><offset>0x0719</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></macro><!--Specifies memory offset value and mask information --><infinity><!--Offset value in the OTP memory --><offset>0x071B</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></infinity><!--Specifies memory offset value and mask information --><hall><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></hall><!--Specifies memory offset value and mask information --><hallBias><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></hallBias><!--Hall register address to update with calibrated data --><hallRegisterAddr>0</hallRegisterAddr><!--Specifies memory offset value and mask information --><verticalMacro><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></verticalMacro><!--Specifies memory offset value and mask information --><verticalInfinity><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></verticalInfinity><!--Specifies memory offset value and mask information --><horizontalMacro><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></horizontalMacro><!--Specifies memory offset value and mask information --><horizontalInfinity><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></horizontalInfinity><!--Margin value to extend towards macro region --><macroMargin>0</macroMargin><!--margin value to extend towards infinity region --><infinityMargin>0</infinityMargin><!--lens sag in macro calibration --><lensSagCalMac>DEFAULT</lensSagCalMac><!--lens sag in infinity calibration --><lensSagCalInf>DEFAULT</lensSagCalInf><!--Specifies memory offset value and mask information --><otpGravityOfs0to90><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></otpGravityOfs0to90><!--Specifies memory offset value and mask information --><otpGravityOfs90to180><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></otpGravityOfs90to180><!--average value of gravity offset from 0 to 90 --><avgGravityOfs0to90>0</avgGravityOfs0to90><!--average value of gravity offset from 90 to 180 --><avgGravityOfs90to180>0</avgGravityOfs90to180></AF><!--Specifies white balance data information to format the OTP dataelement for WB data availablity and endianelement for WBType informationelement for WB light informationelement for mirror informationelement for flip informationelement for qValue informationelement for isInvertGROverGB information --><WB><!--Specifies the availability of the specified data and type of endiannesselement for operation --><WBData description="Memory Type"><!--Specifies whether a particular OTP data available or not --><isAvailable>true</isAvailable><!--Type of the EndiannessValid values are: BIG, LITTLE --><endianness>LITTLE</endianness></WBData><!--Type of the white balance dataValid values are: INDIVIDUAL, RATIO --><datatype>RATIO</datatype><!--whitebalance information for a particular light typeelement for light typeelement for R value informationelement for gr Value informationelement for b Value informationelement for gb Value informationelement for rOverG Value informationelement for bOverG Value informationelement for grOverGB Value information --><lightInfo description="White balance light Information"><!--Type of the illuminantSupported illuminants are D65, TL84, A, D50 and H --><illuminantType>D50</illuminantType><!--Specifies memory offset value and mask information --><rValue><!--Offset value in the OTP memory --><offset>0x0</offset><!--mask value which will be applied to obtain required data bits --><mask>0x0</mask></rValue><!--Specifies memory offset value and mask information --><grValue><!--Offset value in the OTP memory --><offset>0x0</offset><!--mask value which will be applied to obtain required data bits --><mask>0x0</mask></grValue><!--Specifies memory offset value and mask information --><bValue><!--Offset value in the OTP memory --><offset>0x0</offset><!--mask value which will be applied to obtain required data bits --><mask>0x0</mask></bValue><!--Specifies memory offset value and mask information --><gbValue><!--Offset value in the OTP memory --><offset>0x0</offset><!--mask value which will be applied to obtain required data bits --><mask>0x0</mask></gbValue><!--Specifies memory offset value and mask information --><rOverGValue><!--Offset value in the OTP memory --><offset>0x0021</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></rOverGValue><!--Specifies memory offset value and mask information --><bOverGValue><!--Offset value in the OTP memory --><offset>0x0023</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></bOverGValue><!--Specifies memory offset value and mask information --><grOverGBValue><!--Offset value in the OTP memory --><offset>0x0025</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></grOverGBValue></lightInfo><!--Specifies memory offset value and mask information --><mirror><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></mirror><!--Specifies memory offset value and mask information --><flip><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></flip><!--Q value --><qValue>1024.0</qValue><!--Set to TRUE if GRoverGB needs to be inverted --><isInvertGROverGB>TRUE</isInvertGROverGB></WB><!--Specifies LSC data information to format the OTP dataelement for LSC data availablity and endianelement for LSC light informationelement for mesh HW roll off size informationelement for incrimenting value for obtaing R value informationelement for incrimenting value for obtaing GR value informationelement for incrimenting value for obtaing GB value informationelement for incrimenting value for obtaing B value information --><LSC><!--Specifies the availability of the specified data and type of endiannesselement for operation --><LSCData description="Memory Type"><!--Specifies whether a particular OTP data available or not --><isAvailable>true</isAvailable><!--Type of the EndiannessValid values are: BIG, LITTLE --><endianness>BIG</endianness></LSCData><!--Lens shading information for a particular rolloff lightelement for light typeelement for MSB part of the R gain value informationelement for LSB part of the R gain value informationelement for MSB part of the gr gain value informationelement for LSB part of the gr gain value informationelement for MSB part of the gb gain value informationelement for LSB part of the gb gain value informationelement for MSB part of the b gain value informationelement for LSB part of the b gain value information --><lightInfo description="Lens shading light information"><!--Type of the illuminantSupported illuminants are D65, TL84, A, D50 and H --><illuminantType>D50</illuminantType><!--Specifies memory offset value and mask information --><rGainMSB><!--Offset value in the OTP memory --><offset>0x0030</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></rGainMSB><!--Specifies memory offset value and mask information --><rGainLSB><!--Offset value in the OTP memory --><offset>0x002F</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></rGainLSB><!--Specifies memory offset value and mask information --><grGainMSB><!--Offset value in the OTP memory --><offset>0x0032</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></grGainMSB><!--Specifies memory offset value and mask information --><grGainLSB><!--Offset value in the OTP memory --><offset>0x0031</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></grGainLSB><!--Specifies memory offset value and mask information --><gbGainMSB><!--Offset value in the OTP memory --><offset>0x0034</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></gbGainMSB><!--Specifies memory offset value and mask information --><gbGainLSB><!--Offset value in the OTP memory --><offset>0x0033</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></gbGainLSB><!--Specifies memory offset value and mask information --><bGainMSB><!--Offset value in the OTP memory --><offset>0x0036</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></bGainMSB><!--Specifies memory offset value and mask information --><bGainLSB><!--Offset value in the OTP memory --><offset>0x0035</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></bGainLSB></lightInfo><!--mesh HW rolloff size --><meshHWRollOffSize>221</meshHWRollOffSize><!--position of the next R value from the current R --><rIncrement>8</rIncrement><!--position of the next GR value from the current GR --><grIncrement>8</grIncrement><!--position of the next GB value from the current GB --><gbIncrement>8</gbIncrement><!--position of the next B value from the current B --><bIncrement>8</bIncrement></LSC><!--Specifies shield pixel correction data information to format the OTP dataelement for SPC data availablity and endianelement for offset address of the SPC dataelement for SPC address informationelement for size of the SPC settings informationelement for address type informationelement for data type informationelement for delay to write each registry entry information --><SPC><!--Specifies the availability of the specified data and type of endiannesselement for operation --><SPCData description="Memory Type"><!--Specifies whether a particular OTP data available or not --><isAvailable>false</isAvailable><!--Type of the EndiannessValid values are: BIG, LITTLE --><endianness>BIG</endianness></SPCData><SPCSettings><!--Specifies memory offset value and mask information --><dataOffset><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></dataOffset><!--register address value to write SPC data --><SPCAddress>0</SPCAddress><!--size of the SPC data settings --><settingsSize>0</settingsSize></SPCSettings><!--Register address / data size in bytes --><addressType range="[1,4]">2</addressType><!--Register address / data size in bytes --><dataType range="[1,4]">1</dataType><!--Delay in milli seconds. Delay is 0 if not explicitly provided --><delay>0</delay></SPC><OIS><OISData description="Memory Type"><isAvailable>false</isAvailable><endianness>BIG</endianness></OISData><dataOffset><offset>0</offset><mask>0xFF</mask></dataOffset><OISAddressArray>0</OISAddressArray><settingsSize>0</settingsSize><addressType range="[1,4]">2</addressType><dataType range="[1,4]">1</dataType><delay>0</delay></OIS><!--Specifies PDAF defocus conversion coefficient data information to format the OTP dataelement for PDAF 2D data availablity and endianelement for version informationelement for X informationelement for Y informationelement for X ratio informationelement for Y ratio informationelement for map width informationelement for map height informationelement for gain width informationelement for gain height informationelement for left gain map informationelement for right gain map informationelement for conversion Coefficient Count informationelement for conversion Coefficient information --><PDAF2D><!--Specifies the availability of the specified data and type of endiannesselement for operation --><PDAF2DData description="Memory Type"><!--Specifies whether a particular OTP data available or not --><isAvailable>true</isAvailable><!--Type of the EndiannessValid values are: BIG, LITTLE --><endianness>LITTLE</endianness></PDAF2DData><!--Specifies memory offset value and mask information --><version><!--Offset value in the OTP memory --><offset>0x0721</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></version><!--Specifies memory offset value and mask information --><mapWidth><!--Offset value in the OTP memory --><offset>0x0723</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></mapWidth><!--Specifies memory offset value and mask information --><mapHeight><!--Offset value in the OTP memory --><offset>0x0725</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></mapHeight><!--gain width --><gainWidth>17</gainWidth><!--gain height --><gainHeight>13</gainHeight><!--Specifies memory offset value and mask information --><leftGainMap><!--Offset value in the OTP memory --><offset>0x0727</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></leftGainMap><!--Specifies memory offset value and mask information --><rightGainMap><!--Offset value in the OTP memory --><offset>0x08E1</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></rightGainMap><!--count of the conversion coefficient --><conversionCoefficientCount>48</conversionCoefficientCount><!--Specifies memory offset value and mask information --><DCCQFormatMemoryInfo><!--Offset value in the OTP memory --><offset>0x0A9D</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></DCCQFormatMemoryInfo><!--Specifies memory offset value and mask information --><DCCMapWidthMemoryInfo><!--Offset value in the OTP memory --><offset>0x0A9F</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></DCCMapWidthMemoryInfo><!--Specifies memory offset value and mask information --><DCCMapHeightMemoryInfo><!--Offset value in the OTP memory --><offset>0x0AA1</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></DCCMapHeightMemoryInfo><!--Specifies memory offset value and mask information --><conversionCoefficient><!--Offset value in the OTP memory --><offset>0x0AA3</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></conversionCoefficient></PDAF2D></formatInfo>
</EEPROMDriverData>
EEPROM需要根据模组厂提供的EEPROM烧录内容和格式说明进行配置,
验证EEPROM
adb shell echo "dumpSensorEEPROMData=1" >> /vendor/etc/camera/camxoverridesettings.txt
该命令执行成功后可以查看/vendor/etc/camera/camxoverridesettings.txt是否生效,然后adb reboot重启设备后打开相机,在/data/vendor/camera/路径下会生成类似文件:
- p24c64e_kbuffer_OTP.txt:从EEPROM中读取的所有数据
- p24c64e_lsc_OTP.txt :从EEPROM中读取的LSC OTP数据
- p24c64e_wb_OTP.txt:从EEPROM中读取的WBOTP数据
需要确认:
- 读取的数据长度是否与设置的一致?并且大于或者等于烧录内容长度;
- 读取的WB OTP数据是否合法?
- 读取的LSC OTP数据是否合法?尤其注意是否为0或者明显特别大的数据;
WB OTP数据示例:
p24c64e_wb_OTP.txt
Whitebalance data dump for EEPROM p24c64eLight Type: A rOverG = 0.828125bOverG = 0.281250grOverGB = 0.999023Light Type: TL84 rOverG = 0.608398bOverG = 0.479492grOverGB = 0.999023Light Type: D65 rOverG = 0.429688bOverG = 0.657227grOverGB = 0.999023
LSC OTP数据示例:
multicamera配置
高通Camera会根据
vendor/qcom/proprietary/chi-cdk/oem/qcom/multicamera/chimcxcameraconfig/configs中的配置与DTS中的配置对应然后找到具体加载哪一份配置
netrani/netrani_dc.xml
<Devicesxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="../../../tools/logicalcameragenerator/logicalcam.xsd"><PhysicalDevice name="RearPhysicalCam" slotId="6" cameraId="0" sensorName="ov13b10"/>
</Devices>
编译
vendor/qcom/proprietary/chi-cdk/oem/Android.mk中指定了编译so文件:
include $(CAMX_CHICDK_OEM_PATH)/qcom/sensor/ov13b10/build/android/Android.mk
vendor/qcom/proprietary/chi-cdk/configs/product.mk:
PRODUCT_PACKAGES += com.qti.sensor.ov13b10
PRODUCT_PACKAGES += com.qti.sensormodule.united_ov13b10.bin
PRODUCT_PACKAGES += com.qti.tuned.united_ov13b10.bin
vendor/qcom/proprietary/chi-cdk/oem/qcom/buildbins/build/android/binary_parrot会有相应的mk文件,指定了使用哪一个文件来生成:
qti.sensormodule.united_ov13b10.mk
##################################
# Generate camx binary file from XMLsifeq ($(CAMX_CHICDK_PATH),)LOCAL_PATH := $(abspath $(call my-dir)/../../..)CAMX_CHICDK_PATH := $(abspath $(LOCAL_PATH)/../../..)
elseLOCAL_PATH := $(CAMX_CHICDK_OEM_PATH)/qcom/buildbins
endifinclude $(CLEAR_VARS)# file name of the binary
CAMX_LOCAL_BIN := com.qti.sensormodule.united_ov13b10.bin# the inputs to the binary
CAMX_LOCAL_BIN_INPUTS := sensor/ov13b10/ov13b10_sensor.xml \sensor/ov13b10/ov13b10_pdaf.xml \module/united_ov13b10_module.xml \eeprom/p24c64e_ov13b10_eeprom.xml \actuator/dw9714p_actuator.xml \flash/pmic_flash.xmlCAMX_BINARY_XSD_PATH := $(CAMX_CHICDK_PATH)/api/sensor/# The argument for the ParameterParser
# leave it blank if you are not sure about it.
CAMX_LOCAL_PARAMETERPARSER_ARG :=# include the common settings for camx binary generation
include $(CAMX_BUILD_GENERIC_BINARY)
相关文章:

高通Camera点亮3——Camera Module
Camera点亮除了Sensor之外还需要配置module、EEPROM等,multicamera;配置好编译设置。 Module <?xml version"1.0" encoding"utf-8" ?> <cameraModuleData<!--Module group can contain either 1 module or 2 modules…...

学习路程二 LangChain基本介绍
前面简单调用了一下deepseek的方法,发现有一些疑问和繁琐的问题,需要更多的学习,然后比较流行的就是LangChain这个东西了。 目前大部分企业都是基于 LangChain 、qwen-Agent、lammaIndex框架进行大模型应用开发。LangChain 提供了 Chain、To…...

Docker-技术架构演进之路
目录 一、概述 常见概念 二、架构演进 1.单机架构 2.应用数据分离架构 3.应用服务集群架构 4.读写分离 / 主从分离架构 5.引入缓存 —— 冷热分离架构 6.垂直分库 7.业务拆分 —— 微服务 8.容器化引入——容器编排架构 三、尾声 一、概述 在进行技术学习过程中&am…...
API接口设计模式:从分层架构到CQRS的实战应用
以下将从分层架构和 CQRS(命令查询职责分离)的基本概念入手,为你阐述从分层架构到 CQRS 的实战应用相关内容: 分层架构 概念:分层架构是将系统按照功能划分为不同的层次,每个层次负责特定的职责,…...

【机器学习】【KMeans聚类分析实战】用户分群聚类详解——SSE、CH 指数、SC全解析,实战电信客户分群案例
1.引言 在实际数据分析中,聚类算法常用于客户分群、图像分割等场景。如何确定聚类数 k 是聚类分析中的关键问题之一。本文将以“用户分群”为例,展示如何通过 KMeans 聚类,利用 SSE(误差平方和,也称 Inertiaÿ…...
【C++】 时间库chrono计算程序运行时间
C 时间库chrono计算程序运行时间 本文总结了chrono库的引入方法以及计算程序片段运行时间的方法 一、chrono库的引入方法(注意事项) 首先chrono是属于std命名空间的。 所以在程序中应该这样包含头文件: #include <chrono> using n…...
PCL 边界体积层次结构(Boundary Volume Hierarchy, BVH)
文章目录 一、简介二、实现代码三、实现效果参考资料一、简介 边界体积层次结构(Boundary Volume Hierarchy, BVH) 是一种高效的空间数据结构,广泛应用于计算机图形学、计算机视觉、机器人学、物理仿真等领域。它的核心思想是通过将空间递归地划分为层次化的包围体(通常是轴…...
算法随笔_58: 队列中可以看到的人数
上一篇:算法随笔_57 : 游戏中弱角色的数量-CSDN博客 题目描述如下: 有 n 个人排成一个队列,从左到右 编号为 0 到 n - 1 。给你以一个整数数组 heights ,每个整数 互不相同,heights[i] 表示第 i 个人的高度。 一个人能 看到 他右边另一个人…...

创建React项目的三个方式
创建React项目 创建一个React项目非常简单,通常有几种方法可以进行,下面是最常见的几种方法: 1. 使用 create-react-app (已经不被推荐了) create-react-app 是一个官方的脚手架工具,用于快速创建 React 项目。它会为你配置好很…...
QT闲记-工具栏
工具栏通常用来放置常用的操作按钮,如QPushButton,QAction等。可以放置在顶部,底部,左侧,右侧,并且支持拖曳,浮动。 1、创建工具栏 通常通过QMainWindow 提供的addToolBar()来创建,它跟菜单栏一样,如果需要工具栏,一般情况下,我们设置这个类的基类为QMainWindow。 …...

为什么继电器要加一个反向并联一个二极管
1 动感就是电流不突变 2 为什么有的继电器上面要反向并联一个二极管和电阻 1 并联二极管是为消除掉动感产生的高压 2 加上二极管是为了让继电器更快的断开(二极管选型的工作电流要大于动感电流,开关要够快) 3 公式:二极管压降0…...
【Leetcode 每日一题 - 扩展】1512. 好数对的数目
问题背景 给你一个整数数组 n u m s nums nums。 如果一组数字 ( i , j ) (i,j) (i,j) 满足 n u m s [ i ] n u m s [ j ] nums[i] nums[j] nums[i]nums[j] 且 i < j i < j i<j,就可以认为这是一组 好数对 。 返回好数对的数目。 数据约束 1 ≤ n …...
vue3 采用xlsx库实现本地上传excel文件,前端解析为Json数据
需求:本地上传excel 文件,但需要对excel 文件的内容进行解析,然后展示出来 1. 安装依赖 首先,确保安装了 xlsx 库: bash复制 npm install xlsx 2. 创建 Vue 组件 创建一个 Vue 组件(如 ExcelUpload.v…...

计算机视觉:经典数据格式(VOC、YOLO、COCO)解析与转换(附代码)
第一章:计算机视觉中图像的基础认知 第二章:计算机视觉:卷积神经网络(CNN)基本概念(一) 第三章:计算机视觉:卷积神经网络(CNN)基本概念(二) 第四章:搭建一个经典的LeNet5神经网络(附代码) 第五章࿱…...

FPGA DSP:Vivado 中带有 DDS 的 FIR 滤波器
本文使用 DDS 生成三个信号,并在 Vivado 中实现低通滤波器。低通滤波器将滤除相关信号。 介绍 用DDS生成三个信号,并在Vivado中实现低通滤波器。低通滤波器将滤除较快的信号。 本文分为几个主要部分: 信号生成:展示如何使用DDS&am…...

记录此刻:历时两月,初步实现基于FPGA的NVMe SSD固态硬盘存储控制器设计!
背景 为满足实验室横向项目需求,在2024年12月中下旬导师提出基于FPGA的NVMe SSD控制器研发项目。项目核心目标为:通过PCIe 3.0 x4接口实现单盘3000MB/s的持续读取速率。 实现过程 调研 花了半个月的时间查阅了一些使用FPGA实现NVME SSD控制器的论文、…...
【计算机网络】OSI模型、TCP/IP模型、路由器、集线器、交换机
一、计算机网络分层结构 计算机网络分层结构 指将计算机网络的功能划分为多个层次,每个层次都有其特定的功能和协议,并且层次之间通过接口进行通信。 分层设计的优势: 模块化:各层独立发展(如IPv4→IPv6,…...

正点原子[第三期]Arm(iMX6U)Linux系统移植和根文件系统构建-5.3 xxx_defconfig过程
前言: 本文是根据哔哩哔哩网站上“arm(iMX6U)Linux系统移植和根文件系统构键篇”视频的学习笔记,在这里会记录下正点原子 I.MX6ULL 开发板的配套视频教程所作的实验和学习笔记内容。本文大量引用了正点原子教学视频和链接中的内容。 引用: …...

250223-Linux/MacOS如何跳过Miniconda的条款阅读,直接安装Miniconda
你可以通过将 -b 参数传递给 Miniconda 的安装脚本,来跳过条款阅读并自动同意许可条款。这样安装会自动进行到下一步的选择项。下面是具体的安装命令: bash Miniconda3-latest-Linux-x86_64.sh -b这里的 -b 代表“批量模式”(batch mode&…...

点云的几何特征
点云的几何特征是基于一个点周围的邻域对该点周围几何形状的描述。例如,位于墙面上的一个点将具有较高的平面度planarity。 基于局部点云的特征值 λ1、λ2 和 λ3 以及特征向量 e1、e2 和e3计算得到的一系列几何特征,这些特征用于描述点云中点的局部几…...

接口测试中缓存处理策略
在接口测试中,缓存处理策略是一个关键环节,直接影响测试结果的准确性和可靠性。合理的缓存处理策略能够确保测试环境的一致性,避免因缓存数据导致的测试偏差。以下是接口测试中常见的缓存处理策略及其详细说明: 一、缓存处理的核…...
【杂谈】-递归进化:人工智能的自我改进与监管挑战
递归进化:人工智能的自我改进与监管挑战 文章目录 递归进化:人工智能的自我改进与监管挑战1、自我改进型人工智能的崛起2、人工智能如何挑战人类监管?3、确保人工智能受控的策略4、人类在人工智能发展中的角色5、平衡自主性与控制力6、总结与…...
逻辑回归:给不确定性划界的分类大师
想象你是一名医生。面对患者的检查报告(肿瘤大小、血液指标),你需要做出一个**决定性判断**:恶性还是良性?这种“非黑即白”的抉择,正是**逻辑回归(Logistic Regression)** 的战场&a…...
解决本地部署 SmolVLM2 大语言模型运行 flash-attn 报错
出现的问题 安装 flash-attn 会一直卡在 build 那一步或者运行报错 解决办法 是因为你安装的 flash-attn 版本没有对应上,所以报错,到 https://github.com/Dao-AILab/flash-attention/releases 下载对应版本,cu、torch、cp 的版本一定要对…...

QT: `long long` 类型转换为 `QString` 2025.6.5
在 Qt 中,将 long long 类型转换为 QString 可以通过以下两种常用方法实现: 方法 1:使用 QString::number() 直接调用 QString 的静态方法 number(),将数值转换为字符串: long long value 1234567890123456789LL; …...

C++ Visual Studio 2017厂商给的源码没有.sln文件 易兆微芯片下载工具加开机动画下载。
1.先用Visual Studio 2017打开Yichip YC31xx loader.vcxproj,再用Visual Studio 2022打开。再保侟就有.sln文件了。 易兆微芯片下载工具加开机动画下载 ExtraDownloadFile1Info.\logo.bin|0|0|10D2000|0 MFC应用兼容CMD 在BOOL CYichipYC31xxloaderDlg::OnIni…...
React---day11
14.4 react-redux第三方库 提供connect、thunk之类的函数 以获取一个banner数据为例子 store: 我们在使用异步的时候理应是要使用中间件的,但是configureStore 已经自动集成了 redux-thunk,注意action里面要返回函数 import { configureS…...

基于 TAPD 进行项目管理
起因 自己写了个小工具,仓库用的Github。之前在用markdown进行需求管理,现在随着功能的增加,感觉有点难以管理了,所以用TAPD这个工具进行需求、Bug管理。 操作流程 注册 TAPD,需要提供一个企业名新建一个项目&#…...
Kubernetes 网络模型深度解析:Pod IP 与 Service 的负载均衡机制,Service到底是什么?
Pod IP 的本质与特性 Pod IP 的定位 纯端点地址:Pod IP 是分配给 Pod 网络命名空间的真实 IP 地址(如 10.244.1.2)无特殊名称:在 Kubernetes 中,它通常被称为 “Pod IP” 或 “容器 IP”生命周期:与 Pod …...

实战三:开发网页端界面完成黑白视频转为彩色视频
一、需求描述 设计一个简单的视频上色应用,用户可以通过网页界面上传黑白视频,系统会自动将其转换为彩色视频。整个过程对用户来说非常简单直观,不需要了解技术细节。 效果图 二、实现思路 总体思路: 用户通过Gradio界面上…...