How can I integrate acquired image with drop down functions?

1 次查看(过去 30 天)
I am new to app designer and working on a project where I have added two push button and acquired the static as well as real time image via webcam respectively. Now I want to perform task on it like 2-D fft and binarize it but I want user to choose which image he wants to operate and then perform task so I have given 2dropdown one for 2d FFT with static or captured image and same for next one how can I integrate the image acquired with drop down and perform Acton's like fft and binarize it. Urgent help needed.

回答(2 个)

Kavya Vuriti
Kavya Vuriti 2020-7-2
编辑:Kavya Vuriti 2020-7-2
Hi,
From the question, I understand that the two images captured must be shared between the callbacks of Buttons and Drop Down. I think there are two ways to do this:
  • Define data as properties to make them accessible to all functions and callbacks in an app.
  • Send the variables to MATLAB base workspace and then access them from base workspace wherever required. This can be done using assignin and evalin functions respectively.
Here is the detailed description on defining properties in an app. Hope this helps!!
  1 个评论
rajatajay thakur
rajatajay thakur 2020-7-17
Hey kavya thanks for you help but now I am stuck into a more problem where I am using sliders to adjust the brightness and contrast of the image which I have acquired but pushing two separate button one for static image and other for real time web cam image . The help what I need is that I want the images acquired earlier by pushing any one of the button and displaying them on axes say 3 now I have other button for image processing which is integrated with sliders call back the sliders work but the image what is acquired dosent come it shows a black screen.help needed.

请先登录,再进行评论。


rajatajay thakur
rajatajay thakur 2020-7-17
Brightness = app.Brightness Slider.Value;
function Image Processing Button Pushed (app, event)
Contrast = apps.Contrast Slider.Value;
uax=app.UIAxes 2;
J1 =uint8(double(uax)*Contrast + Brightness); imshow(J 1, parent', app.UIAxes 4);
This is the code I have used help to know how to bring image from earlier pushbuttons and perform action in other push button

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by