MATLAB Answers


Sweep to calculate the average amount of objects that fit within a given area and shape

Asked by Angel
on 28 Jun 2013

The matlab code has to be able to look through an entire image and decide the average amount of objects that fall within a "trapezoid stamp" of a specified area given calibration specifications. How would I get started? I got a counter almost working for the whole image, now I just need that counter to work like the description given.


Is this homework? Did your instructor give you any theory to get started? Can the trapezoids be at any arbitrary angle? If you put a bunch of puzzle pieces on the table and corral them with a string then mask that with a trapezoid, you'll have a count of objects that completely fit inside the trapezoid. If you do it again, with the pieces in different orientations, you'll get a different count. Is that what you want to do?

There is a specific trapezoid that is wanted but for a general help, this does not matter as much. Yes, this is what I want. Any help is appreciated.

Again, could you post an image illustrating what you are trying to do? It is still not really clear what your goal is.


No products are associated with this question.

0 Answers

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!