Change threshold value in image analysing setting file

Share your programming ideas for various measurement and analysis tasks here
Post Reply
user-6033
Posts: 89
Joined: Thu Jan 01, 1970 1:00 am

Change threshold value in image analysing setting file

Post by user-6033 »

Hi,

I have been trying to change the threshold value in an image analysisng setting file by loading an existing file into ias and using it in Zen.Analyzing.AnalysingInteractive(image, ias). The setting is set so that the only interactive step is the segmentation. But it seems as the value can not be saved afterwards when using ias.save. When I use ias next time it will still be the "old" threshold value and not the new one (I have tried both analyzeinteractive and just analyze). If I take an existing ias where the only interactive step is the segmentaion and load it into the wizard I still have to through all seven steps, but the threshold seems to be saved after the wizard is used. The idea is that the user with help of an existing image analysis setting file do the threshold initially once but that the following automatic acquiring of images and analyzing rely on this threshold value.

Kind regards
Fredrik Olsson
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

Dear Fredrik Olsson,

in the ‘Interactive Analysis’ the value of a setting (ias) cannot be saved, neither manually nor programmatically.

Your use case (the user does the threshold initially once with the help of an existing image analysis setting file but the following automatic acquiring of images and analyzing rely on this threshold value) has been discussed at Zeiss and it will be on the ‘ToDo-List’ of a future release.


‘If I take an existing ias where the only interactive step is the segmentation and load it into the wizard I still have to through all seven steps.’

You can decide (checkbox) for each step whether it will show up as an interactive step or not. This can be set when configuring the analysis setting.


Thanks for your contribution!
user-6033
Posts: 89
Joined: Thu Jan 01, 1970 1:00 am

Post by user-6033 »

Hi,

I thought it was possible to modify settings and afterwards save them with ias.save but maybe there was only an exception with threshold values. In the thread "Save object stage positions in text file" you have in the code example the following:

## ANALYSIS
## Load analysis setting
ias = ZenImageAnalysisSetting()
ias.Load('Move measured object to image center')
## Analyze the image
Zen.Application.Pause("Do setup for segmentation")
Zen.Analyzing.AnalyzeInteractive(image,ias)
## Save modified image analysis setting
ias.Save('Move measured object to image center')


So I based my idea on this code example but with aim of modifyng the threshold. I will make some changes in my code and use your excellent example of the external mask instead - that was a very valuable example!

Kind regards
Fredrik Olsson
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

Hello Fredrik Olsson,

you are right. ias.

ias.Save('Move measured object to image center')

will not work so I modified the corresponding macro.

ias.Save() just works if you really use the functions of the ias-class.

Thank you for your contribution!
Thomas Watson
Posts: 2
Joined: Thu Jul 13, 2023 9:34 am

Re: Change threshold value in image analysing setting file

Post by Thomas Watson »

When looking for High quality windshield replacement in Phoenix, it's important to consider a few factors to ensure you receive reliable service and top-notch materials. Here's what you should look for:

Reputation and Experience: Choose a windshield replacement provider in Phoenix with a solid reputation and years of experience in the industry. Look for companies with positive customer reviews, certifications, and a track record of delivering quality service.

OEM or OEM Equivalent Glass: Opt for a service provider that offers Original Equipment Manufacturer (OEM) or OEM equivalent glass for the replacement. OEM glass is produced by the same manufacturer that supplied the original windshield, ensuring the best fit and quality. OEM equivalent glass is made to the same specifications as OEM glass and provides comparable performance.
Post Reply