A simple question about vision.MarkerInserter.

Hello guys,
I wanted to make a system in such a way that only when the object is in the area of interest, it will only be detected and accepted. Now, the problem is that I have used the vision.MarkerInserter but the matlab example don't provide enough information on how to apply the ROIInputPort. If I am not mistaken, it requires you to put in the parameters of the ROI like [x y height width]. The following is the code that I typed, can anyone tell me what I did wrong here? Thank you.
markInserter = vision.MarkerInserter('Shape', 'Circle', 'fill', true , 'BorderColor', 'white', 'ROIInputPort', 'true', [100, 0, 500, 800]);

 Respuesta aceptada

Walter Roberson
Walter Roberson el 20 de Jul. de 2015
markInserter = vision.MarkerInserter('Shape', 'Circle', 'fill', true , 'BorderColor', 'white', 'ROIInputPort', 'true');
ROI = [100, 0, 500, 800];
J = step(markerInserter,I,PTS,ROI);
for some I and PTS

3 comentarios

Thank you for your fast reply and your answer, what about vision.shapeInserter like this, it does apply the same rule right?
shapeInserter = vision.ShapeInserter('BorderColor','White', 'ROIInputPort', 'true');
ROI = [100, 0, 500, 800];
results = step(shapeInserter, frame, PTS, ROI);
The problem is that PTS states where the shape, text or marker inserter goes right? Then what input should I put in because this is a video, the PTS will sure change every frame in the video? Thanks.
Regards, Akira
Walter Roberson
Walter Roberson el 20 de Jul. de 2015
Yes, similar for shapeInserter.
If you look at http://www.mathworks.com/help/vision/ref/vision.shapeinserter-class.html it appears likely that usually PTS would be fixed (the shape you want to insert), and that ROI would be what is detected by blob analyzer. PTS is taken relative to ROI.
Akira Chan
Akira Chan el 26 de Jul. de 2015
Thank you very much for your help!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Preguntada:

el 20 de Jul. de 2015

Comentada:

el 26 de Jul. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by