Import pixel mask

173 views
Skip to first unread message

Кирилл Рысин

unread,
Apr 3, 2024, 3:29:50 AM4/3/24
to PIVlab
Help, mates.
I have installed a new version of PIVLAB.
Version MATLAB R2023 (9.14.0).

Problem with adding mask . When loading a mask, the message "Busy, please wait" appears. And in Matlab itself an error message appears.

Unable to resolve the name 'gui.gui_update_progress'.
Error in mask.mask_import_Callback (line 21)
gui.gui_update_progress(round(i/AnzahlMasks*100))
Error while evaluating UIControl Callback.
Unable to resolve the name 'gui.gui_update_progress'.
Error in mask.mask_import_Callback (line 21)
gui.gui_update_progress(round(i/AnzahlMasks*100))
Error while evaluating UIControl Callback.

Which way to dig? What is the problem?

William Thielicke (Shrediquette)

unread,
Apr 3, 2024, 6:44:59 AM4/3/24
to PIVlab
Hi, what do you mean with "when loading a mask"? Are you importing a mask from a bitmap image or are you loading a previously saved mask? What is your current directory in Matlab (type pwd in the command window)? Are you running the app or from a zip file?

Кирилл Рысин

unread,
Apr 3, 2024, 9:32:12 AM4/3/24
to PIVlab
As recommended - I created a mask in a graphic editor. I use bitmap image - tiff format, where only white and black colours are used. The image is a black circle with a white background around it. The black colour is the working area, PIVlab does not take into account the rest. In the previous version, this way of setting the mask worked.

Catalogue
>> pwd
ans =
    'C:\Users\Admin/Documents\MATLAB'

Matlab is installed.
Pivlab extracted the files from the zip archive and placed them in a folder. Then loaded the folder into Matlab.

среда, 3 апреля 2024 г. в 15:44:59 UTC+5, tras...@gmx.com:

thielickeoptolution

unread,
Apr 3, 2024, 9:35:28 AM4/3/24
to PIVlab
Hi, if you are working with PIVlab, you must not change the current directory in Matlab. Or add the folder where PIVlab is located with the command addpath ('C:\Users\Admin\Documents\MATLAB\PIVlab').

William Thielicke (Shrediquette)

unread,
Apr 10, 2024, 2:24:42 AM4/10/24
to PIVlab
Did you solve your problem?

Кирилл Рысин

unread,
Apr 11, 2024, 11:46:53 PM4/11/24
to PIVlab
yes. thanks mate. either manually specify the directory - or install in the matlab folder.
But now another question.
if i add a circle mask from .tiff, it becomes not circular, but in the form of segments. matlab converts it, and is there any way to get rid of it?

среда, 10 апреля 2024 г. в 11:24:42 UTC+5, tras...@gmx.com:

William Thielicke (Shrediquette)

unread,
Apr 15, 2024, 1:28:34 PM4/15/24
to PIVlab
Hi, you could remove the line 
reduce(roi,0.005)
in file
+mask\mask_px_to_rois.m
to get more vertices for your objects.

Reply all
Reply to author
Forward
0 new messages