基于欧拉法求解类流体颗粒位置与取向控制方程的技术咨询
传送带输送颗粒的欧拉法控制方程推导与场参数获取
问题背景
我需要推导传送带输送的这类颗粒(整体表现出流体特性)的位置场$(x,y,t)$与取向场$\theta(x,y,t)$的控制方程。
尝试过的方法及问题
- 最初采用拉格朗日分析方法,需要识别每个颗粒的位置$(X_i)$和相对水平方向的取向角$\theta_i$,但遇到了严重的图像分割问题:
- 使用MATLAB编写了基于HSV阈值的分割代码,尝试分割颗粒,但结果显示颗粒形成大块团聚区域,无法区分单个颗粒;
- 用Python的OpenCV模块尝试分割,效果更差。
所用MATLAB代码
clear function [BW,maskedRGBImage] = mymask(RGB) %createMask Threshold RGB image using auto-generated code from colorThresholder app. % [BW,MASKEDRGBIMAGE] = createMask(RGB) thresholds image RGB using % auto-generated code from the colorThresholder app. The colorspace and % range for each channel of the colorspace were set within the app. The % segmentation mask is returned in BW, and a composite of the mask and % original RGB images is returned in maskedRGBImage. % Auto-generated by colorThresholder app on 01-Apr-2024 %------------------------------------------------------ % Convert RGB image to chosen color space I = rgb2hsv(RGB); % Define thresholds for channel 1 based on histogram settings channel1Min = 0.009; channel1Max = 0.112; % Define thresholds for channel 2 based on histogram settings channel2Min = 0.103; channel2Max = 0.275; % Define thresholds for channel 3 based on histogram settings channel3Min = 0.347; channel3Max = 0.687; % Create mask based on chosen histogram thresholds sliderBW = (I(:,:,1) >= channel1Min ) & (I(:,:,1) <= channel1Max) & ... (I(:,:,2) >= channel2Min ) & (I(:,:,2) <= channel2Max) & ... (I(:,:,3) >= channel3Min ) & (I(:,:,3) <= channel3Max); BW = sliderBW; % Initialize output masked image based on input image. maskedRGBImage = RGB; % Set background pixels where BW is false to zero. maskedRGBImage(repmat(~BW,[1 1 3])) = 0; end inpict = imread('test.png'); mk = mymask(inpict); % create a mask using global thresholds mk = bwareaopen(mk,100); % get rid of a thousand tiny specks S = regionprops(mk,'area'); CT = hsv(numel(S)); CT(2:2:end,:) = flipud(CT(2:2:end,:)); % the result is one giant conglomerate blob % and several smaller conglomerate blobs alpha = 0.8; outpict = labeloverlay(inpict,bwlabel(mk), ... 'transparency',1-alpha,'colormap',CT); imshow(outpict,'border','tight')
分割结果
MATLAB的分割结果显示画面中存在一个大型团聚块和若干小型团聚块,完全无法区分出单个颗粒,导致拉格朗日法无法实施。
核心疑问
由于逐颗粒随时间追踪的难度极大,请问如何采用欧拉分析方法推导这类颗粒的控制方程,或者获取对应的场参数?
内容的提问来源于stack exchange,提问作者LOL Ciskram
相关产品推荐
相关产品推荐

