Rev | Line | |
---|
[702] | 1 | % 'ima_green': take the gree component of a color image
|
---|
| 2 |
|
---|
| 3 | %------------------------------------------------------------------------
|
---|
| 4 | %%%% Use the general syntax for transform fields with a single input %%%%
|
---|
| 5 | % OUTPUT:
|
---|
| 6 | % DataOut: output field structure
|
---|
| 7 |
|
---|
| 8 | %INPUT:
|
---|
| 9 | % DataIn: first input field structure
|
---|
| 10 | %------------------------------------------------------------------------
|
---|
| 11 | function DataOut=ima_green(DataIn)
|
---|
| 12 |
|
---|
| 13 | DataOut=DataIn; %default
|
---|
| 14 | if ndims(DataOut.A)==3
|
---|
| 15 | DataOut.A=DataOut.A(:,:,2);
|
---|
| 16 | end
|
---|
| 17 | |
---|
Note: See
TracBrowser
for help on using the repository browser.