PHAY0032 – PreformulationJava

Java Python PHAY0032 – Preformulation

Problem-based learning workshop

In the module so far, we have looked at a range of physicochemical concepts and discussed how they relate to the formulation of a drug. In this workshop, we will look at some exercises to see how these properties will impact formulation decisions.

In advance of the workshop: Please have a look through the questions below and the material covered to date, and make a list of things you are unsure of – we can discuss these before we start the exercises.

In the workshop we will work through the exercises below together.

Exercises

1. A company is looking to develop a fast dissolving formulation of a drug D. The structure of D is given below.

a) Consider the structure of D. Do you expect it to have high solubility in water? What about its permeability?

b) Experiments are performed to determine the partition coefficient for D. Explain what is meant by the term partition coefficient, and explain why it is useful to determine its value.

c) 43.7 mg of D is dissolved in 170 mL of octanol, and 330 mL of water is added. After shaking, the final amount of D in the aqueous phase is 1.72 mg. Determine log P for D. Show your working in full in your answer.

d) During preformulation studies, it is found that D exists as two polymorphs, form. I and form. II. What is meant by the term polymorphism? What differences will there be between form. I and form. II?

e) Form. I and form. II of D have melting points of 67.2 and 123 °C respectively, and ΔfusH values of 34.5 and 89.3 kJ mol-1. Calculate the ideal solubility of both polymorphs at 25 °C. What assumptions are made in ideal solubility?

f) Which form. is the most stable one?

g) When the solubility in water is measured, the x2 values for forms I and II are found to be 1.34 x 10-6 and 3.45 x 10-8 respectively. Compare and contrast these to the values you calculated in part e.

h) The company attempt to formulate the metastable form. of D into a tablet. They perform. a dissolution test for 24h, and obtain the data below. Explain these findings.

i) Comment on the feasibility of making i) an immediate release and ii) an extended release formulation of D.

j) How might the physical form. of D be altered to improve the solubility?

2. Ultimately, the company abandon their work on D, and start to explore a new drug, D’.

a) The structure of D’ is given below. How does this relate to the original active ingredient D? Explain the rationale for the company’s shift to this new active.

b) The company want to formulate D’ as an immediate release formulation. Comment on the likelihood of this.

c) The solubility of D’ is measure PHAY0032 – PreformulationJava d at a number of different pH values, and the results are given in the table below. Use these data to calculate its intrinsic solubility. The pKa of D’ is 3.22.

pH

Solubility (μg / mL)

1

0.571

2

0.602

4

3.99

d) The partitioning of D’ is studied at pH 1 and pH 4. 10 μg of drug is dissolved into 100 mL of an aqueous buffer for each experiment, and this is then shaken with 100 mL of octanol. At pH 1, the amount of drug in the water layer after this is found to be 0.237 μg, while at pH 4 1.45 μg of drug remains in the aqueous phase. Calculate log Po,w and log Do,w at both pH values.

e) Although the company find that D’ performs better than D, they are still not happy with its performance. Thus, they consider forming a salt. Suggest some suitable salt formers to use with D’.

f) In dissolution tests of some salts of D’, it is found that the rate of dissolution at pH 2 (representative of the stomach) is very similar to that at pH 6.8 (representing the lower parts of the gastrointestinal tract). Explain why these observations are seen.

g) The dissolution rate is found to be too slow for practical applications of the D’ salts. How might the company solve this problem?

3.

a) Pseudopolymorphs such as co-crystals can be used to give active pharmaceutical ingredients improved properties. Explain what is meant by the terms pseudopolymorph and co-crystal, and explain how a co-crystal differs from a solvate.

b) What benefits can co-crystals have in pharmaceutical formulation? Give examples of co-crystal systems for each benefit you give.

c) A company prepares co-crystals of a new drug E and suberic acid. The structures of each are given below, together with some dissolution data. Rationalise the observations seen in the dissolution experiment.

d) E is intended to be taken alongside another drug, F. The structure of F is shown below. In in vivo experiments on rats, kidney problems are observed to arise after approximately two weeks of taking both active ingredients simultaneously. Explain why this occurs         

close all; clc; clear; tic; %% 01 参数配置 W = 1280; H = 720; save_folder = "data/project"; mkdir(save_folder); save_file_csv = strcat(save_folder, "/","patterns.csv"); % 用于写入到投影仪 n = 4; % 格雷码位数 % 相移参数 N = 12; % 相移步数 A = 130; B = 90; TW = W / (2 ^ n); TH = H / (2 ^ n); %% 02 生成相移法图像 [~, patterns_phaseshift_X] = m_make_phase_shift_patterns(A, B, TW, N, W, H); [~, temp_Y] = m_make_phase_shift_patterns(A, B, TH, N, H, W); patterns_phaseshift_Y = zeros(N, H, W); for i = 1: N patterns_phaseshift_Y(i, :, :) = squeeze(temp_Y(i, :, :))'; end %% 03 生成格雷码图像:X方向 patterns_graycode_X = m_make_gray_code_patterns(n, W, H); temp_Y = m_make_gray_code_patterns(n, H, W); [num, H, W] = size(patterns_graycode_X); patterns_graycode_Y = zeros(num, H, W); for i = 1: num patterns_graycode_Y(i, :, :) = squeeze(temp_Y(i, :, :))'; end %% 04 写入图像 idx = 0; file = fopen(save_file_csv, "w+"); % 写入相移图案 X for i = 1: N idx = idx + 1; % 写入图片 save_file_img = strcat(save_folder, "/", int2str(idx), ".bmp"); disp("写入文件到:" + save_file_img); img = squeeze(patterns_phaseshift_X(i, :, :)); imwrite(img, save_file_img); % 写入csv文件 img_row = squeeze(img(1, :)) * 255.; for w = 1: W fprintf(file, strcat(int2str(round(img_row(w))), ",")); end fprintf(file, "\n"); end % 写入格雷码程序 X for i = 1: num idx = idx + 1; % 写入图像 save_file_img = strcat(save_folder, "/", int2str(idx), ".bmp"); disp("写入文件到:" + save_file_img); img = squeeze(patterns_graycode_X(i, :, :)); imwrite(img, save_file_img); % 写入图像 img_row = squeeze(img(1, :)); for w = 1: W fprintf(file, strcat(int2str(round(img_row(w))), ",")); end fprintf(file, "\n"); end % 写入相移图案 Y for i = 1: N idx = idx + 1; % 写入图片 save_file_img = strcat(save_folder, "/", int2str(idx), ".bmp"); disp("写入文件到:" + save_file_img); img = squeeze(patterns_phaseshift_Y(i, :, :)); imwrite(img, save_file_img); % 写入csv文件 img_row = squeeze(img(1, :)) * 255.; for w = 1: W fprintf(file, strcat(int2str(round(img_row(w))), ",")); end fprintf(file, "\n"); end % 写入格雷码程序 Y for i = 1: num idx = idx + 1; % 写入图像 save_file_img = strcat(save_folder, "/", int2str(idx), ".bmp"); disp("写入文件到:" + save_file_img); img = squeeze(patterns_graycode_Y(i, :, :)); imwrite(img, save_file_img); % 写入图像 img_row = squeeze(img(1, :)); for w = 1: W fprintf(file, strcat(int2str(round(img_row(w))), ","));close all; clc; clear; tic; %% 01 参数配置 calib_folder = "data/calib"; N = 12; n = 4; num = n + 2; B_min = 10; % 低于这个调制度的我们就认为它的相位信息不可靠 IT = 0.5; % 格雷码阈值 win_size = 7; % 中值滤波窗口大小 W = 1280; H = 720; points_per_row = 7; points_per_col = 6; w = 2; load("data/calib/camera_imagePoints.mat"); [~, ~, calib_num] = size(imagePoints); prjPoints = zeros(size(imagePoints)); %% 02 标定投影仪、相机 for calib_idx = 1: calib_num disp(calib_idx); data_folder = calib_folder + "/" + num2str(calib_idx); %% 02 近似查看图像圆心 img = 255 - imread(data_folder + "/18.bmp"); for i = 1: points_per_row * points_per_col xy = imagePoints(i, :, calib_idx); x = round(xy(1)); y = round(xy(2)); img(y, x) = 255; end figure(); mesh(img); %% 03 解X\Y相位 files_phaseShiftX = cell(1, N); idx = 1; for i = 1: N files_phaseShiftX{i} = strcat(data_folder, "/", int2str(idx), ".bmp"); idx = idx + 1; end files_grayCodeX = cell(1, num); for i = 1: num files_grayCodeX{i} = strcat(data_folder, "/", int2str(idx), ".bmp"); idx = idx + 1; end files_phaseShiftY = cell(1, N); for i = 1: N files_phaseShiftY{i} = strcat(data_folder, "/", int2str(idx), ".bmp"); idx = idx + 1; end files_grayCodeY = cell(1, num); for i = 1: num files_grayCodeY{i} = strcat(data_folder, "/", int2str(idx), ".bmp"); idx = idx + 1; end [phaX, difX] = m_calc_absolute_phase(files_phaseShiftX, files_grayCodeX, IT, B_min, win_size); [phaY, difY] = m_calc_absolute_phase(files_phaseShiftY, files_grayCodeY, IT, B_min, win_size); phaX = phaX * W; phaY = phaY * H; for i = 1: points_per_row * points_per_col xy = imagePoints(i, :, calib_idx); x = xy(1); y = xy(2); x_round = round(x); y_round = round(y); % 对x、y附近对相位进行样条曲线插值 xs = zeros(1, 2 * w + 1); ys = zeros(1, 2 * w + 1); phas_x = zeros(1, 2 * w + 1); phas_y = zeros(1, 2 * w + 1); ii = 1; for j = - 1 * w: w es,'X (mm)'); ylabel(player.Axes,'Y (mm)'); zlabel(player.Axes,'Z (mm)'); view(player,ptCloud); pha_y = spline(ys, phas_y, y); prjPoints(i, :, calib_idx) = [pha_x, pha_y]; end end save(calib_folder + "\projector_imagePoints.mat", 'prjPoints'); toc; end fprintf(file, "\n"); end disp("写入完成"); fclose(file); toc;帮我一句一句解释这段代码
09-19
帮我一行一行的解读代码function [pha_absolute, dif] = m_calc_absolute_phase(files_phaseShift, files_grayCode, IT, B_min, win_size) [~, N] = size(files_phaseShift); [pha_wrapped, B] = m_calc_warppred_phase(files_phaseShift, N); [~, n] = size(files_grayCode); n = n - 2; % 鎶曞奖浜嗕竴榛戜竴鐧戒袱骞呭浘鐗� Ks = m_calc_gray_code(files_grayCode, IT, n); pha_absolute = pha_wrapped + 2 * pi .* Ks; % 璋冨埗搴︽护娉� B_mask = B > B_min; pha_absolute = pha_absolute .* B_mask; % 杈圭紭璺冲彉璇樊 [pha_absolute, dif] = m_filter2d(pha_absolute, win_size); % 褰掍竴鍖� pha_absolute = pha_absolute / (2 * pi * 2^ n); endfunction [Ks] = m_calc_gray_code(files, IT, n) % 01 璇诲彇姣忎竴寮犲浘鐗囪繘Is [~, num] = size(files); img = imread(files{1}); [h, w] = size(img); Is = zeros(num, h, w); for i = 1: num img = imread(files{i}); Is(i, :, :) = double(img); end % 02 璁$畻Is_Max銆両s_Min锛屽姣忎釜鐐硅繘琛岄槇鍊煎垽鏂� Is_max = max(Is); Is_min = min(Is); Is_std = (Is - Is_min) ./ (Is_max - Is_min); gcs = Is_std > IT; % 03 瀵规瘡涓儚绱犵偣锛岃绠楃紪鐮佸�糣 Vs_row = zeros(1, 2 ^ n, 'uint8'); codes = m_gray_code(n); for i = 1: 2 ^ n code = str2mat(codes(i)); %#ok<DSTRMT> V = 0; for j = 1: n V = V + str2num(code(j)) * 2^ (4 - j); %#ok<ST2NM> end Vs_row(1, i) = V; end % 04 寤虹珛 V - > K 鐨勬槧灏勮〃 V2K = containers.Map(); for K = 1: 2 ^ n V = Vs_row(1, K); V2K(int2str(V)) = K - 1; end Ks = zeros(h, w); for v = 1: h %disp(strcat("绗�", int2str(v), "琛�")); for u = 1: w % 涓嶉渶瑕佹渶鍚庨粦銆佺櫧涓ゅ箙鍥剧墖鐨勭紪鐮� gc = gcs(1: n, v, u); V = 0; for i = 1: n V = V + gc(i) * 2 ^ (4 - i); end % 涓昏鐨勬�ц兘鐡堕 Ks(v, u) = V2K(int2str(V)); end end end %% 计算包裹相位 function [pha, B] = m_calc_warppred_phase(files, N) sin_sum = 0; cos_sum = 0; for k = 0: N - 1 Ik = m_imread(files{k + 1}); % 读取图片 Ik = m_filter2d(Ik); sin_sum = sin_sum + Ik * sin(2 * k * pi / N); cos_sum = cos_sum + Ik * cos(2 * k * pi / N); end % 根据计算相位、调制度 pha = atan2(sin_sum, cos_sum); B = sqrt(sin_sum .^ 2 + cos_sum .^ 2) * 2 / N; %% 尝试注释掉这段,自己从零实现一遍 % 为了将波折相位转为单个周期内单调递增 pha = - pha; pha_low_mask = pha <= 0; pha = pha + pha_low_mask .* 2. * pi; end %% 读取图片 function [img] = m_imread(file) img = imread(file); img = double(((img(:, :, 1)))); % 转换灰度图 end %% 高斯滤波 function [img] = m_filter2d(img) w = 3.; sigma = 1.; kernel = fspecial("gaussian", [w, w], sigma); img = imfilter(img, kernel, "replicate"); end% 滤波 function [pha_new, dif] = m_filter2d(pha, win_size) % 中值滤波(格雷码边缘处计算出现问题) pha_new = medfilt2(pha, [win_size, win_size]); % (剔除未编码区域) dif = pha - pha_new; endfunction [code] = m_gray_code(n) if (n < 1) disp("鏍奸浄鐮佹暟閲忓繀椤诲ぇ浜�0"); return; elseif (n == 1) % 浜х敓0銆�1 涓や釜鏁板瓧 code = ["0", "1"]; % 杩斿洖code else code_pre = m_gray_code(n - 1); [~, num] = size(code_pre); % 鍒濆鍖栦竴涓暟缁� code = repmat("", 1, num * 2); % step1锛氭瘡涓瓧绗︿覆鍓嶉潰閮�+0 idx = 0; for i = 1: num idx = idx + 1; code(idx) = "0" + code_pre(i); end % step2锛氱炕杞涓厓绱狅紝鍏朵綑鍙栧绉� for i = num: -1: 1 idx = idx + 1; code(idx) = "1" + code_pre(i); end end endfunction [patterns] = m_make_gray_code_patterns(n, W, H) codes = m_gray_code(n); % 灏嗗瓧绗︿覆鏍奸浄鐮佽浆鎹负鐭╅樀鏍煎紡 [~, num] = size(codes); codes_mat = zeros(n, num, 'int8'); for col = 1: num code_col = str2mat(codes(col)); %#ok<DSTRMT> for row = 1: n codes_mat(row, col) = str2num(code_col(row)); %#ok<ST2NM> end end W_per = round(W / num); % 姣忓紶鍥剧墖 patterns = zeros(n + 2, H, W, "uint8"); for idx = 1: n % 涓�琛屽浘鐗� row_one = zeros(1, W, "uint8"); % 姣忎釜鏍煎瓙 for i = 1 : num gray = codes_mat(idx, i); % 鏍煎瓙閲屾瘡涓儚绱� for w = 1: W_per row_one(1, (i - 1) * W_per + w) = gray; end end row_one = row_one * 255; pattern = repmat(row_one, H, 1); patterns(idx, :, :) = pattern; end % 鍏ㄩ粦銆佸叏鐧藉浘鐗囷紝鐢ㄤ簬纭畾姣忎釜鍍忕礌闃堝�� patterns(n + 2, :, :) = ones(H, W, 'uint8') * 255; end% 函数:生成相移条纹 function [Is, Is_img] = m_make_phase_shift_patterns(A, B, T, N, W, H) Is = cell(N, 1); Is_img = zeros(N, H, W); xs = 1: W; f_2pi = 1. / double(T) * 2. * pi; for k = 0: N - 1 Is{k + 1} = A + B * cos(f_2pi * xs + 2 * k / N * pi); Is_img(k + 1, :, :) = repmat(Is{k + 1} / 255., H, 1); end end close all; clc; clear; tic; %% 01 鍙傛暟閰嶇疆 W = 1280; H = 720; save_folder = "data/project"; mkdir(save_folder); save_file_csv = strcat(save_folder, "/","patterns.csv"); % 鐢ㄤ簬鍐欏叆鍒版姇褰变华 n = 4; % 鏍奸浄鐮佷綅鏁� % 鐩哥Щ鍙傛暟 N = 12; % 鐩哥Щ姝ユ暟 A = 130; B = 90; TW = W / (2 ^ n); TH = H / (2 ^ n); %% 02 鐢熸垚鐩哥Щ娉曞浘鍍� [~, patterns_phaseshift_X] = m_make_phase_shift_patterns(A, B, TW, N, W, H); [~, temp_Y] = m_make_phase_shift_patterns(A, B, TH, N, H, W); patterns_phaseshift_Y = zeros(N, H, W); for i = 1: N patterns_phaseshift_Y(i, :, :) = squeeze(temp_Y(i, :, :))'; end %% 03 鐢熸垚鏍奸浄鐮佸浘鍍忥細X鏂瑰悜 patterns_graycode_X = m_make_gray_code_patterns(n, W, H); temp_Y = m_make_gray_code_patterns(n, H, W); [num, H, W] = size(patterns_graycode_X); patterns_graycode_Y = zeros(num, H, W); for i = 1: num patterns_graycode_Y(i, :, :) = squeeze(temp_Y(i, :, :))'; end %% 04 鍐欏叆鍥惧儚 idx = 0; file = fopen(save_file_csv, "w+"); % 鍐欏叆鐩哥Щ鍥炬 X for i = 1: N idx = idx + 1; % 鍐欏叆鍥剧墖 save_file_img = strcat(save_folder, "/", int2str(idx), ".bmp"); disp("鍐欏叆鏂囦欢鍒�:" + save_file_img); img = squeeze(patterns_phaseshift_X(i, :, :)); imwrite(img, save_file_img); % 鍐欏叆csv鏂囦欢 img_row = squeeze(img(1, :)) * 255.; for w = 1: W fprintf(file, strcat(int2str(round(img_row(w))), ",")); end fprintf(file, "\n"); end % 鍐欏叆鏍奸浄鐮佺▼搴� X for i = 1: num idx = idx + 1; % 鍐欏叆鍥惧儚 save_file_img = strcat(save_folder, "/", int2str(idx), ".bmp"); disp("鍐欏叆鏂囦欢鍒�:" + save_file_img); img = squeeze(patterns_graycode_X(i, :, :)); imwrite(img, save_file_img); % 鍐欏叆鍥惧儚 img_row = squeeze(img(1, :)); for w = 1: W fprintf(file, strcat(int2str(round(img_row(w))), ",")); end fprintf(file, "\n"); end % 鍐欏叆鐩哥Щ鍥炬 Y for i = 1: N idx = idx + 1; % 鍐欏叆鍥剧墖 save_file_img = strcat(save_folder, "/", int2str(idx), ".bmp"); disp("鍐欏叆鏂囦欢鍒�:" + save_file_img); img = squeeze(patterns_phaseshift_Y(i, :, :)); imwrite(img, save_file_img); % 鍐欏叆csv鏂囦欢 img_row = squeeze(img(1, :)) * 255.; for w = 1: W fprintf(file, strcat(int2str(round(img_row(w))), ",")); end fprintf(file, "\n"); end % 鍐欏叆鏍奸浄鐮佺▼搴� Y for i = 1: num idx = idx + 1; % 鍐欏叆鍥惧儚 save_file_img = strcat(save_folder, "/", int2str(idx), ".bmp"); disp("鍐欏叆鏂囦欢鍒�:" + save_file_img); img = squeeze(patterns_graycode_Y(i, :, :)); imwrite(img, save_file_img); % 鍐欏叆鍥惧儚 img_row = squeeze(img(1, :)); for w = 1: W fprintf(file, strcat(int2str(round(img_row(w))), ",")); end fprintf(file, "\n"); end disp("鍐欏叆瀹屾垚"); fclose(file); toc;close all; clc; clear; tic; %% 01 鍙傛暟閰嶇疆 calib_folder = "data/calib"; N = 12; n = 4; num = n + 2; B_min = 10; % 浣庝簬杩欎釜璋冨埗搴︾殑鎴戜滑灏辫涓哄畠鐨勭浉浣嶄俊鎭笉鍙潬 IT = 0.5; % 鏍奸浄鐮侀槇鍊� win_size = 7; % 涓�兼护娉㈢獥鍙eぇ灏� W = 1280; H = 720; points_per_row = 7; points_per_col = 6; w = 2; load("data/calib/camera_imagePoints.mat"); [~, ~, calib_num] = size(imagePoints); prjPoints = zeros(size(imagePoints)); %% 02 鏍囧畾鎶曞奖浠�佺浉鏈� for calib_idx = 1: calib_num disp(calib_idx); data_folder = calib_folder + "/" + num2str(calib_idx); %% 02 杩戜技鏌ョ湅鍥惧儚鍦嗗績 img = 255 - imread(data_folder + "/18.bmp"); for i = 1: points_per_row * points_per_col xy = imagePoints(i, :, calib_idx); x = round(xy(1)); y = round(xy(2)); img(y, x) = 255; end figure(); mesh(img); %% 03 瑙\Y鐩镐綅 files_phaseShiftX = cell(1, N); idx = 1; for i = 1: N files_phaseShiftX{i} = strcat(data_folder, "/", int2str(idx), ".bmp"); idx = idx + 1; end files_grayCodeX = cell(1, num); for i = 1: num files_grayCodeX{i} = strcat(data_folder, "/", int2str(idx), ".bmp"); idx = idx + 1; end files_phaseShiftY = cell(1, N); for i = 1: N files_phaseShiftY{i} = strcat(data_folder, "/", int2str(idx), ".bmp"); idx = idx + 1; end files_grayCodeY = cell(1, num); for i = 1: num files_grayCodeY{i} = strcat(data_folder, "/", int2str(idx), ".bmp"); idx = idx + 1; end [phaX, difX] = m_calc_absolute_phase(files_phaseShiftX, files_grayCodeX, IT, B_min, win_size); [phaY, difY] = m_calc_absolute_phase(files_phaseShiftY, files_grayCodeY, IT, B_min, win_size); phaX = phaX * W; phaY = phaY * H; for i = 1: points_per_row * points_per_col xy = imagePoints(i, :, calib_idx); x = xy(1); y = xy(2); x_round = round(x); y_round = round(y); % 瀵箈銆亂闄勮繎瀵圭浉浣嶈繘琛屾牱鏉℃洸绾挎彃鍊� xs = zeros(1, 2 * w + 1); ys = zeros(1, 2 * w + 1); phas_x = zeros(1, 2 * w + 1); phas_y = zeros(1, 2 * w + 1); ii = 1; for j = - 1 * w: w xs(1, ii) = x_round + j; ys(1, ii) = y_round + j; phas_x(1, ii) = phaX(y_round, xs(1, ii)); phas_y(1, ii) = phaY(ys(1, ii), x_round); ii = ii + 1; end pha_x = spline(xs, phas_x, x); pha_y = spline(ys, phas_y, y); prjPoints(i, :, calib_idx) = [pha_x, pha_y]; end end save(calib_folder + "\projector_imagePoints.mat", 'prjPoints'); toc;%% Clear everything existing. clc; clear; close all; data_folder = "data/model"; N = 12; n = 4; num = n + 2; B_min = 10; % 浣庝簬杩欎釜璋冨埗搴︾殑鎴戜滑灏辫涓哄畠鐨勭浉浣嶄俊鎭笉鍙潬 IT = 0.5; % 鏍奸浄鐮侀槇鍊� win_size = 7; % 涓�兼护娉㈢獥鍙eぇ灏� %% step1: input parameters width = 1280; % camera width height = 1024; % camera height prj_width = 1280; % projector width %camera: Projection matrix Pc load('CamCalibResult.mat'); Kc = KK; % 鐩告満鍐呭弬 Ac = Kc * [Rc_1, Tc_1]; %projector: Projection matrix Pp load('PrjCalibResult.mat'); Kp = KK; % 鎶曞奖浠唴鍙� Ap = Kp * [Rc_1, Tc_1]; %% step2: 璇诲彇娴嬭瘯鍥剧墖骞朵笖璁$畻涓夌淮閲嶅缓 % % 鏉$汗棰戠巼64锛屼篃鏄棿璺濓紙涓�涓懆鏈熺敱64涓儚绱犵粍鎴愶級鐢ㄤ簬璁$畻缁濆鐩镐綅锛岄鐜�1銆�8鐢ㄤ簬鍖呰9鐩镐綅灞曞紑 % f = 64; % 鏉$汗棰戠巼锛堝崟涓懆鏈熸潯绾圭殑鍍忕礌涓暟锛夛紝鍗砅 % load('up_test_obj.mat'); % up_test_obj = up_test_obj / f; % 灏嗙浉浣嶅綊涓�鍖栧埌[0, 2pi]涔嬮棿 % % figure; imshow(up_test_obj / (2 * pi)); colorbar; title("鐩镐綅鍥�, freq=" + num2str(f)); % figure; mesh(up_test_obj); colorbar; title("鐩镐綅鍥�, freq=" + num2str(f)); % % % 璁$畻鎶曞奖浠潗鏍� % x_p = up_test_obj / (2 * pi) * prj_width; idx = 1; files_phaseShiftX = cell(1, N); for i = 1: N files_phaseShiftX{i} = strcat(data_folder, "/", int2str(idx), ".bmp"); idx = idx + 1; end files_grayCodeX = cell(1, num); for i = 1: num files_grayCodeX{i} = strcat(data_folder, "/", int2str(idx), ".bmp"); idx = idx + 1; end [phaX, difX] = m_calc_absolute_phase(files_phaseShiftX, files_grayCodeX, IT, B_min, win_size); up_test_obj = phaX * 2 * pi; x_p = phaX * prj_width; % 3D閲嶅缓 Xws = nan(height, width); Yws = nan(height, width); Zws = nan(height, width); for y = 1:height for x = 1:width if ~(up_test_obj(y, x) == 0) uc = x - 1; vc = y - 1; up = (x_p(y, x) - 1); % Eq. (32) in the reference paper. A = [Ac(1,1) - Ac(3,1) * uc, Ac(1,2) - Ac(3,2) * uc, Ac(1,3) - Ac(3,3) * uc; Ac(2,1) - Ac(3,1) * vc, Ac(2,2) - Ac(3,2) * vc, Ac(2,3) - Ac(3,3) * vc; Ap(1,1) - Ap(3,1) * up, Ap(1,2) - Ap(3,2) * up, Ap(1,3) - Ap(3,3) * up]; b = [Ac(3,4) * uc - Ac(1,4); Ac(3,4) * vc - Ac(2,4); Ap(3,4) * up - Ap(1,4)]; XYZ_w = inv(A) * b; Xws(y, x) = XYZ_w(1); Yws(y, x) = XYZ_w(2); Zws(y, x) = XYZ_w(3); end end end % 鐐逛簯鏄剧ず xyzPoints(:, 1) = Xws(:); xyzPoints(:, 2) = Yws(:); xyzPoints(:, 3) = Zws(:); ptCloud = pointCloud(xyzPoints); xlimits = [min(Xws(:)), max(Xws(:))]; ylimits = [min(Yws(:)), max(Yws(:))]; zlimits = ptCloud.ZLimits; player = pcplayer(xlimits, ylimits, zlimits); xlabel(player.Axes,'X (mm)'); ylabel(player.Axes,'Y (mm)'); zlabel(player.Axes,'Z (mm)'); view(player,ptCloud);
09-19
本系统是基于 Java MVC 架构(Model-View-Controller)的校园租赁管理平台,旨在实现校内物品租赁的数字化、规范化与高效化。 项目采用前后端分离思路,分为用户端与管理员端,覆盖从租赁发布、查询、下单、归还到后台管理的完整业务流程。 1. 解决传统租赁痛点:纸质登记、信息不透明、归还统计不便。 2. 提升校园资源利用率:学生可自由浏览与租赁校内物品(如实验仪器、体育用品、会议设备等)。 3. 实现可追踪管理:管理员可实时掌握租赁状态与用户行为记录。 系统人群: • 学生/普通用户:浏览租赁物品、提交租赁申请、归还物品、查看租赁历史。 • 管理员/社团负责人:发布物品信息、审核租赁申请、更新物品状态、查看租赁用户名单。 学生: 1. 用户注册与登录:支持账号注册、登录、密码找回。 2. 物品浏览与搜索:按类别、名称、状态筛选,支持模糊搜索与分页。 3. 租赁申请与归还:用户填写租赁信息,管理员审核后生成租赁记录,可在“我的租赁”中归还。 4. 租赁历史与状态查询:查看历史租赁记录及状态(已归还/逾期)。 管理员: 1. 物品管理:添加、修改、下架物品,上传图片,设置租赁规则与数量。 2. 用户租赁管理:审核租赁申请、查看租赁人员名单、管理归还记录。 • 开发环境: - JDK 8+ - Tomcat 9+ - MySQL 5.7/8.0 - Spring / SpringMVC / MyBatis(或原生 JDBC) • 数据库表设计(核心): - users:用户信息表 - items:物品信息表 - orders:租赁订单表 - admin:管理员账户表
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值