Edge detection between position and neagtive

조회 수: 2 (최근 30일)
Mohamed Jamal
Mohamed Jamal 2020년 7월 7일
답변: Image Analyst 2020년 7월 7일
Hi guys, Im trying to do in matlab edge detection that when I have a change value between 1 to -1 or between -1 to 1 (ranges is -1<data<1) ) so will detect this crosses/sections between moving from positive to negative or from negative to positive!
any help how can I do that edge detector in matlab? thanks alot

답변 (1개)

Image Analyst
Image Analyst 2020년 7월 7일
Is this what you're looking for:
% Create sample data in the range -1 to +1.
v = 2 * rand(1, 50) - 1
% Find out which ones of those are negative.
negativeIndexes = v < 0
% Find where it goes from above 0 to below 0
crossingIndexes = strfind(negativeIndexes, [0, 1])

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by