Posts by Danna

    Dear Carmen Z,


    I generated the HAP file through the VA program, and then burned it to the acquisition card (me5-ma-vcl), but no image appeared. The camera used is ACA 2040-180km of basler, and the camera is set to 1 × 8-1Y (tap geometry) and Full mode (configuration) through the camera software pylon.

    In addition, how can I modify camport? My VA software has set two DMA outputs, but their ports are all displayed as port A. does this cause image display failure?

    pasted-from-clipboard.png


    Thank you very much!


    Best wishes


    Danna

    Dear Carmen Z,


    The decimal part is often removed when using the DIV operator for division operations, but the image processing I want to perform will cause large errors when removing the decimal part. Is there any way to add the removed decimal part to the calculation process?


    For example, the division operation has been performed to get the integer part A and the decimal part B. Next, I need to perform square processing. How can I get (A + B). ^ 2?

    I wrote a VA file (as shown in the attachment), and hope you can help me solve this problem.Thank you very much!


    Best wishes


    Danna

    Files

    • j.va

      (7.41 kB, downloaded 1 times, last: )

    Dear Carmen Z,

    Thank you for your reply.


    I want to do pseudo color processing on gray images. Color model refers to the jet color model in MATLAB. This is the function of jet color model in MATLAB.


    %function J = jet(m)

    % if nargin < 1

    % m = size(get(gcf,'colormap'),1);

    % end

    % n = ceil(m/4);

    % u = [(1:n)/n ones(1,n-1) (n:-1:1)/n]';

    % g = ceil(n/2) - (mod(m,4)==1) + (1:length(u))';

    % r = g + n;

    % b = g - n;

    % g(g>m) = [];

    % r(r>m) = [];

    % b(b<1) = [];

    % J = zeros(m,3);

    % J(r,1) = u(1:length(r));

    % J(g,2) = u(1:length(g));

    % J(b,3) = u(end-length(b)+1:end);

    pasted-from-clipboard.png


    Because I don't know much about the jet function in MATLAB, and I'm not sure if I can simulate the jet function in the visual applet, I also plan to use a simple function conversion for pseudo color processing.


    Input a gray image, for each pixel I (I, J), judge the pixel whose gray value is less than 64, transform according to r = 0, g = 4 * I (I, J), B = 255; for the pixel whose gray value is greater than 63 and less than 128, transform according to r = 0, g = 255, B = 255-4 * [I (I, J) - 128]; for the pixel whose gray value is greater than 127 and less than 192, transform according to r = 4 * [I (I, J) - 128], G= 255, B = 0 for transformation; for pixels with gray value greater than 191, according to r = 255, g = 255-4 * [I (I, J) - 192], B = 0 for transformation.

    I tried to write a pseudo color VA file (as shown in the attachment), but it didn't work very well. I would appreciate it if you could help me to point out the problem.


    I hope you can help me solve this problem. thank you very much. And I'm really sorry for the trouble caused by the language problem.


    Best wishes


    Danna

    Files

    • jet.va

      (18.86 kB, downloaded 0 times)

    I'm trying to use the 'rollingAverage_Loop'(VisualApplets_3.1\Examples\Processing\Loop\RollingAverage) to calculate the sum of squares of multiple images.

    pasted-from-clipboard.pngpasted-from-clipboard.png

    In order to make my design run sucessfully, I added an operator-CastBitWidth(squares/StartUp_SUB_1/CastBitWidth) to change the bitwidth from 16 to 8.Right now, I set the N_rolling to 5,and I can see the results of the first four images' processing are the same as expected,but I found that the result of other image processing is not the same as expected.I think that is because I changed the bitwidth before,so I want to know how to change the bitwidth of destination port to keep the bitwidth with 16.Or maybe there's other solution?

    Hope to get the solution as soon as possible.Thank you very much.

    Files

    • squares.va

      (28.64 kB, downloaded 1 times, last: )