フィルターのクリア

Invalid use of operator.

1 回表示 (過去 30 日間)
Raviteja Kurva
Raviteja Kurva 2019 年 1 月 18 日
コメント済み: Walter Roberson 2019 年 1 月 18 日
% 1 step: create slice and save resulting img
% 2 step: run registation
%% create slice and substract dark image
% readim
myfile1 = imread('cam14-blank181112_2018-11-12-115852-0000.jpg');
% dark image subtraction
%dark1 = readtimeseries('dark\camera1\camera1_2015-03-28-204209-0000.tif');
%dark1 = dark1{1};
%myfile1 = myfile1 - squeeze(mean(dark1{1},[],3));
%myfile1 = myfile1 - squeeze(mean(dark1));
dark1 = imread('cam14-blankNoLight181112_2018-11-12-120006-0000.jpg');
myfile1 = myfile1 - dark1;
imwrite(myfile1,'slice_cam14-blank181112_2018-11-12-115852-0000','jpg',0,[])
myfile2 = imread('cam14-blank181112_2018-11-12-115852-0001.jpg');
% dark image subtraction
%dark2 = readtimeseries('dark\camera2\camera2_2015-03-28-204250-0000.tif');
%dark2 = dark2{1};
%myfile2 = myfile2 - squeeze(mean(dark2{1},[],[3 4]));
%myfile2 = myfile2 - squeeze(mean(dark2{1}, [], 3));
dark2 = imread('cam14-blankNoLight181112_2018-11-12-120006-0001.jpg');
myfile2 = myfile2 - dark2;
imwrite(myfile2,'slice_cam14-blank181112_2018-11-12-115852-0001','jpg',0,[])
%%
[separated,transform]=PreprocessPicoSIM('slice_cam14-blank181112_2018-11-12-115852-0000.jpg', 'slice_cam14-blank181112_2018-11-12-115852-0001.jpg');
%%
% save aligned images
stack=squeeze(separated);
Filebase='stack1\\img%03d.tif';
for num=0:size(stack,3)-1;
Filename=sprintf(Filebase,num);
tiffwrite(Filename,squeeze(stack(:,:,num)),'no');
end
% save transformation parameters
% save transform.mat transform
Hello I am very new to programming. please help me out with this. thanks in Advance

回答 (1 件)

Stephan
Stephan 2019 年 1 月 18 日
編集済み: Stephan 2019 年 1 月 18 日
Hi,
try:
% 1 step: create slice and save resulting img
% 2 step: run registation
%% create slice and substract dark image
% readim
myfile1 = imread ('cam14-blank181112_2018-11-12-115852-0000.jpg');
% dark image subtraction
% dark1 = readtimeseries ('dark \ camera1 \ camera1_2015-03-28-204209-0000.tif');
% dark1 = dark1 {1};
% myfile1 = myfile1 - squeeze (mean (dark1 {1}, [], 3));
% myfile1 = myfile1 - squeeze (mean (dark1));
dark1 = imread ('cam14-blankNoLight181112_2018-11-12-120006-0000.jpg');
myfile1 = myfile1 - dark1;
imwrite (myfile1, 'slice_cam14-blank181112_2018-11-12-115852-0000', 'jpg')
myfile2 = imread ('cam14-blank181112_2018-11-12-115852-0001.jpg');
% dark image subtraction
% dark2 = readtimeseries ('dark \ camera2 \ camera2_2015-03-28-204250-0000.tif');
% dark2 = dark2 {1};
% myfile2 = myfile2 - squeeze (mean (dark2 {1}, [], [3 4]));
% myfile2 = myfile2 - squeeze (mean (dark2 {1}, [], 3));
dark2 = imread ('cam14-blankNoLight181112_2018-11-12-120006-0001.jpg');
myfile2 = myfile2 - dark2;
imwrite (myfile2, 'slice_cam14-blank181112_2018-11-12-115852-0001', 'jpg')
%%
[separated, transform] = PreprocessPicoSIM ('slice_cam14-blank181112_2018-11-12-115852-0000.jpg', 'slice_cam14-blank181112_2018-11-12-115852-0001.jpg');
%%
% save aligned images
stack = squeeze (separated);
Filebase = 'stack1 \\ img% 03d.tif';
for num = 0: size (stack, 3) -1
Filename = sprintf (Filebase, num);
tiffwrite (Filename, squeeze (stack (:,:, num)), 'no');
end
% save transformation parameters
% save transform.mat transform
Best regards
Stephan
  5 件のコメント
Stephan
Stephan 2019 年 1 月 18 日
編集済み: Stephan 2019 年 1 月 18 日
following the documentation for imwrite there are no option that can be specified the way you do. i edited my answer this way.
More errors?
i do not find a Matlab function named tiffwrite for 2018b. is it your own function or from another source? maybe you are looking for write.
Walter Roberson
Walter Roberson 2019 年 1 月 18 日
tiffwrite appears in some third party contribution including in some textbooks that supply their own libraries .

サインインしてコメントする。

カテゴリ

Help Center および File Exchange3-D Scene Control についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by