NI VideoMASTER and NI AudioMASTER

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Reading and Setting PQA MTF Parameters

I'm currently using PQA 1.6 and I'm trying to figure out how to programmatically read and set PQA MTF parameters from a configuration file that I made using the PQA 1.6 GUI. The configuration file that I created is for an MTF test with a ROI already configured. 

 

I went through NI's example of how to modify the provider's settings from a configuration file, I then tried to move on to reading and modifying the existing MTF parameters with no luck.  I did see that there is a way to completely override the MTF parameters by using the Provider:Video:MTF method although I would have to then create my own ROI descriptor when I already have one in the configuration file.  I simply just want to change one little MTF parameter.  So my question is how can I change MTF parameters of an exisiting PQA configuration programmatically. 

 

Below is a snapshot of my VI in case anyone is curious.

 

My VI

0 Kudos
Message 1 of 9
(12,968 Views)

DanielID,

 

I have been looking into this, and the only way that I can think to change this configuration setting programmatically would be to use a method. That being said, I would like to escalate this so that I can double check that this is true. 

 

Can you tell me a little more about your application? Are you trying to run several tests with different MTF parameters?

 

Leah

0 Kudos
Message 2 of 9
(12,943 Views)

Yes, I am trying to run several tests at different resolution values.  I simply want to run the same MTF test at different resolution values. I did see that there is a method to write to the MTF parameters but not to read them.  I would want to read them so that I could simply read all of the parameters, change the 1 setting, then write all of the MTF settings back.

 

Ideally there should be a method to read the current MTF parameters so that I may modify want I want then write them back in.  

0 Kudos
Message 3 of 9
(12,938 Views)

Hello DaniellD,

 

Thanks for the information. Leah and I will be looking into this issue.

 

Regards,

 

Izzy O.

Applications Engineer

National Instruments

www.ni.com/support

0 Kudos
Message 4 of 9
(12,921 Views)

Hi DanielID,

 

After looking into your issue and speaking with some of my colleagues, this is what we have come up with. 

 

It is expected behavior that when you change your resolution, your ROI will be reset. This is because your ROI changes when your resolution changes, and without redefining your ROI, it would yeild unexpected results. 

 

We were, however, able to figure out how to programmatically change the ROI of the configuration file. Take a look at this example that shows how to do this. 

 

Please let me know if you have further questions concerning this example. 

 

 

0 Kudos
Message 5 of 9
(12,891 Views)

Maybe we are talking about two different things.  Below is an image that illustrates the resolution value that I want to change.  With the PQA GUI software I can easily change the Resolution value without have to redo the ROI.  I can also change other MTF processor controls such as subsampling, spacing, etc. without having to redo the ROI.  It would be nice if we have the same control programmatically.

 

If what you say is true then that means that the PQA GUI software does what you said in the background and makes it transparent to the user that the ROI has changed.  

 

Although from looking at your example it seems that with a simple code modificiation I can do exactly what I wanted to do originally.  I have an illustration of this in the 2nd image.  Please let me know if I'm correct on this assumption.

 

Untitled.png

 

Untitled2.png

0 Kudos
Message 6 of 9
(12,859 Views)

Daniel D,

 

Nice work! I believe that the solution you pointed out is the methodology that we should use to alter that resolution setting in the MTF parameters. I am glad we were at least able to point you in the right direction, even if it was a little inadvertant on our part. 

 

I do have some follow up questions regarding your application. I am curious as to why your application needs the ability to change the cycles per pixel functionality of this processor programmatically? According to the help file for the the MTF processor, the resolution, along with the subsampling parameter, just affects the cycles per pixel. I am just curious as to why/how is this parameter being exposed programmatically enabling you to succeed with your application.

 

I am looking forward to your response!

 

 

0 Kudos
Message 7 of 9
(12,846 Views)

Some of the engineers here like a chart that shows the Contrast vs Cycles per Pixes (Spatial Frequency) to give them an idea of the lens performance.  The engineers here simply call this an MTF chart, these types of charts seem to be pretty popular. 

 

I would assume that many users of the PQA MTF function do a similar chart, right?

0 Kudos
Message 8 of 9
(12,844 Views)

Hi Daniel,

 

Thanks for letting me know. It is always helpful for us to know how people are using our products. I haven't heard of anyone else with this specific application, but I found an MTF chart in the help file for PQA so I imagine it must be pretty common. 

 

 

0 Kudos
Message 9 of 9
(12,827 Views)