LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How highlight line, move, delete it in 2d picture

Hi! Sorry for my englisch. I began to study Labview version 2012 
I want to highlight a certain line that I drew. Then move it, delete it and change the slope. But there are no ideas for realization.

0 Kudos
Message 1 of 5
(1,422 Views)

If you are talking about changing lines on a picture (as opposed to plotting a line on a Graph, then changing the plot to plot a different line), you may have a problem.  In a picture, every point has a value (for example, "White except where I drew a Red Line").  The problem with "deleting a line" in a picture is you don't know what was "underneath" the line.  Suppose my background was a photograph, and I drew a Red Line on it.  If I wanted to remove the Red Line, I would need to replace the "red" pixels with whatever pixels were present before, a much more complicated process, particularly if there are several lines being drawn.

 

Bob Schor

Message 2 of 5
(1,377 Views)

Bob

Its a long time since I have used them but I think the Vis in the Overlay Palette in vision utilities draws lines and shapes without affecting the picture its drawn on

 

 

 

Message 3 of 5
(1,372 Views)

I'm with Bob on this one. OP is using a picture control, not vision.

 

The picture control needs to redraw everything every time you update. To pick a line and replace it, you need to:

1) do a hit detection on the begin and end points.

2) while moving redraw everything.

3) when done, store these final points.

 

You can however use two picture controls, the top control set to transparent background. Then you only have to update the moving line on that one, the other lines don't need updating in the bottom image.

 

I can see where OP's going with his VI, but it needs a lot of work. The image in the shift register seems to be growing (objects are being added to it), while the local of the image does not seem to be needed at all...

Message 4 of 5
(1,366 Views)

>but it continues to go beyond the set point and reaches to the higher limit

 

Sounds like a normal overshoot to me.

 

PID controllers's are either slow (takes a long time to reach setpoint), or fast but with overshoot. Trick is to dimension the physical system so slow settings are acceptable, or the overshoot is acceptable.

Message 5 of 5
(1,365 Views)