mergesigroi
Description
merges the signal regions of interest specified in roilimsout
= mergesigroi(roilims
,s
)roilims
if they are
separated by s
samples or less.
Examples
Merge Regions of Interest
Consider a two-column matrix of integers that can represent regions of interest of a signal. Merge any regions that are separated by four samples or less.
rois = [1 10; 17 26; 28 43; 47 57; 64 66]; xrois = mergesigroi(rois,4)
xrois = 3×2
1 10
17 57
64 66
Specify the maximum separation as zero to merge contiguous or repeated regions.
nrois = [rois; 57 65; 1 10]; xrois = mergesigroi(rois,0)
xrois = 5×2
1 10
17 26
28 43
47 57
64 66
Merge Overlapping Regions of Interest
Consider a two-column matrix of integers that can represent regions of interest of a signal. Merge any regions that are separated by four samples or less. The function merges overlapping regions in all cases.
rois = [1 10; 17 26; 24 32; 36 40]; xrois = mergesigroi(rois,4)
xrois = 2×2
1 10
17 40
Specify the maximum separation as zero to merge contiguous or repeated regions.
nrois = [rois; 41 45; 1 10]; xrois = mergesigroi(rois,0)
xrois = 3×2
1 10
17 32
36 40
Input Arguments
roilims
— Region-of-interest limits
two-column matrix of positive integers
Region-of-interest limits, specified as a two-column matrix of positive integers. The
ith row of roilims
contains nondecreasing
indices corresponding to the beginning and end samples of the ith
region of interest of a signal.
Example: [5 8; 12 20; 18 25]
specifies a two-column region-of-interest
matrix with three regions.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
s
— Maximum separation between regions of interest to merge
nonnegative integer
Maximum separation between regions of interest to merge, specified as a nonnegative integer.
If you specify s
as 0
,
mergesigroi
merges contiguous, overlapping, or repeated regions
specified in roilims
.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Output Arguments
roilimsout
— Modified region-of-interest limits
two-column matrix of positive integers
Modified region-of-interest limits, returned as a two-column matrix of positive integers.
Output limits are returned in sorted order using the sortrows
function.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Version History
Introduced in R2020b
See Also
Objects
Functions
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)