ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rotate array 3x3

Hello,

I am doing some image processing algorithm

I ve defined 33 basic types of arrays like this:

1 0 0

1 x 1

1 1 1

1 0 0

1 x 0

0 1 0

 

where x does not matter

Then I need to take each pixel in binary image and check if surrounding pixels apply to one of this patterns

There is 256 possibilities of patterns.

I want to rotate basic arrays  in way that from

1 0 0

1 x 1

1 1 1

i can get:

1 0 0

1 x 1

1 1 1

 

1 1 0

1 x 0

1 1 1

 

1 1 1

1 x 0

1 1 0

 

1 1 1

1 x 1

1 0 0

 

1 1 1

1 x 1

0 0 1


1 1 1

0 x 1

0 1 1


0 1 1

0 x 1

1 1 1

I don't know what is faster, define base of 256 possibilities or rotate this 32 patterns in real time

 

lab.png

0 Kudos
Message 1 of 4
(3,081 Views)

Search the forums for "rotate array" for some posts about this.

 

Or go directly to http://forums.ni.com/t5/LabVIEW/2D-array-image-orientation-suggestion-for-simpler-method/m-p/774311?....

0 Kudos
Message 2 of 4
(3,053 Views)

I ve seen that.

i ve decided to do that in brutal way and it seems to be working

 

 

0 Kudos
Message 3 of 4
(3,046 Views)

I don't know why you would pick a "brutal way" over a way that should be easier.

 

I'm not even sure how the VI you posted corrrelates with what you were looking for originally which was how to rotate a 3x3 element 2-D array.

 

Go with whatever feels like it works for you.  Good luck with your project.

0 Kudos
Message 4 of 4
(3,034 Views)