I AE S In t er na t io na l J o urna l o f   Art if icia l In t ellig ence   ( I J - AI )   Vo l.   15 ,   No .   4 ,  A u g u s t 2 0 2 6 ,   p p .   3 3 5 2 ~ 3 3 6 4   I SS N:  2 2 5 2 - 8 9 3 8 ,   DOI : 1 0 . 1 1 5 9 1 /ijai.v 15 .i 4 . p p 3 3 5 2 - 3 3 6 4           3352     J o ur na l ho m ep a g e :  h ttp : //ij a i . ia esco r e. co m   Intellig ent  objec t  so rting sy stem usi ng   Do bo t  M a g icia n  a nd  co mputer vis io n       T o s s a po l J a ng no i 1 ,   T hewi n S a k un bu ny o ng 2 ,   Viro ch  Su k o nta na k a rn 2 ,   T a na wa t   Cha la rds a k ul 2   1 D e p a r t me n t   o f   M e c h a n i c a l   E n g i n e e r i n g ,   F a c u l t y   o f   E n g i n e e r i n g ,   R a j a ma n g a l a   U n i v e r si t y   o f   Te c h n o l o g y   I san ,   K h o n   K a e n ,   Th a i l a n d   2 D e p a r t me n t   o f   M e c h a t r o n i c s E n g i n e e r i n g ,   F a c u l t y   o f   En g i n e e r i n g ,   R a j a m a n g a l a   U n i v e r si t y   o f   Te c h n o l o g y   I san ,   K h o n   K a e n ,   T h a i l a n d       Art icle  I nfo     AB S T RAC T   A r ticle  his to r y:   R ec eiv ed   Au g   5 ,   2 0 2 5   R ev is ed   Ma y   1 3 ,   2 0 2 6   Acc ep ted   Ma y   2 4 ,   2 0 2 6       Th is  stu d y   a ims   to   a n a l y z e   th e   re latio n sh ip   b e twe e n   o b jec t  c o l o r,   s h a p e ,   a n d   c o u n t   a n d   th e   p e rfo rm a n c e   o f   a   r o b o ti c   o b jec t  so rt in g   sy ste m ,   m e a su re d   b y   e x e c u ti o n   ti m e   a n d   a c c u ra c y .   Th e   Do b o t  M a g icia n   r o b o t  wa s  u se d   fo r  o b jec t   m a n ip u lati o n ,   w h il e   c o m p u ter  v isio n   b a se d   o n   o b jec t  d e tec ti o n   wa s   imp lem e n ted   u sin g   P y t h o n   a n d   a n   o p e n   s o u rc e   c o m p u ter   v isi o n   li b ra ry   ( Op e n CV ) .   C o lo r   a n d   sh a p e   se g m e n tatio n   we re   p e rfo rm e d   u sin g   th e   h u e ,   sa tu ra ti o n ,   a n d   v a l u e   ( HSV )   c o l o r  sp a c e   a n d   Op e n CV  li b ra ry .   Ex p e rime n tal  re su lt s  in d ica te  th a t  t h re e   sh a p e s  ( c ircle ,   tri a n g le,  a n d   s q u a re )  a n d   f o u r  c o lo rs  (g re e n ,   re d ,   b l u e ,   a n d   y e ll o w)  a f fe c t  p ick in g   ti m e   a n d   a c c u ra c y   d iffere n tl y .   S q u a re s  g e n e ra ll y   re q u ired   t h e   lo n g e st  ti m e   t o   p ick ,   wh i le  tri a n g les   o ften   h a d   th e   sh o r tes t  ti m e s  a c ro ss   v a rio u s  c o lo rs.  Ac c u ra c y   re m a in e d   c o n siste n tl y   h ig h   a c ro ss   a ll   c o lo rs  a n d   sh a p e s,  with   g re e n   a n d   y e ll o w  o b jec t s  sh o win g   slig h tl y   h ig h e r  a v e ra g e   a c c u ra c y .   Th e se   fin d i n g s  p ro v id e   v a lu a b l e   in sig h ts   in to   t h e   fa c to rs  in fl u e n c in g   th e   p e rfo rm a n c e   o f  a u to m a ted   r o b o ti c   g ra sp i n g   sy ste m s,  wh ich   c a n   b e   a p p li e d   t o   o p ti m ize   r o b o t  d e sig n   a n d   imp ro v e   th e   e fficie n c y   a n d   p re c isio n   o f  o b jec t  so rti n g   tas k s.   K ey w o r d s :   C o m p u ter   v is io n   Do b o t  M ag ician   Ob ject  s o r tin g   Op en C V  lib r ar y   Py th o n   p r o g r a m   T h is i s  a n   o p e n   a c c e ss   a rticle   u n d e r th e   CC B Y - SA   li c e n se .     C o r r e s p o nd ing   A uth o r :   T h ewin   Sak u n b u n y o n g   Dep ar tm en t   o f   Me ch atr o n ics E n g in ee r in g ,   Facu lty   o f   E n g in ee r in g   R ajam an g ala  Un iv er s ity   o f   T e ch n o lo g y   I s an   Kh o n   Kae n ,   T h ailan d   E m ail:  th ewin . s a@ r m u ti.a c. th       1.   I NT RO D UCT I O N   I n   m o d er n   in d u s tr ial  au to m at io n ,   o b ject  s o r tin g   s y s tem s   [ 1 ] ,   [ 2 ]   p lay   a  cr u cial  r o le   in   en h a n cin g   p r o d u ctiv ity ,   ac cu r ac y ,   an d   e f f icien cy .  T r a d itio n al  s o r tin g   m eth o d s   r ely   h ea v ily   o n   p r e - d ef in ed   r u les  an d   h an d cr a f ted   f ea tu r es,  wh ich   o f ten   f ail  to   g en er alize   in   d y n a m ic  o r   co m p lex   en v ir o n m en ts .  T o   ad d r ess   th ese   lim itatio n s ,   ar tific ial  in tellig en ce   ( AI ) — p a r ticu lar ly   d ee p   lear n in g — h as  em e r g ed   as  a  p o wer f u l   s o lu tio n ,   en ab lin g   m ac h in es  to   p er ce iv e  an d   class if y   o b jects  m o r e  ef f ec tiv ely .  T h is   r esear ch   p r ese n ts   a  d ee p   lear n in g - b ased   ap p r o ac h   [ 3 ] ,   [ 4 ]   f o r   o b ject  s o r tin g   u s in g   a  r o b o ti c  ar m ,   with   a  s p ec if ic   f o c u s   o n   id en tify i n g   a n d   class if y in g   o b jects  b ased   o n   t h eir   s h ap e  an d   co lo r   [ 5 ] – [ 7 ] .  T h e  s y s tem   ex tr ac ts   m ea n in g f u l  v is u al  f ea tu r es   f r o m   ca p tu r ed   im ag es,  allo win g   f o r   r o b u s t  o b ject  r ec o g n itio n   u n d er   v a r y in g   co n d itio n s .  T h e  class if ied   in f o r m atio n   is   th e n   u s ed   to   g u id e  t h e  r o b o tic   ar m   f o r   ac cu r ate  an d   e f f icien t  s o r ti n g .  T h e  in teg r atio n   o f   co m p u ter   v is io n   a n d   r o b o tic   m an ip u latio n   o f f e r s   s ig n if ica n t  p o ten tial  f o r   a p p licatio n s   i n   p ac k a g in g ,   waste   m an ag em en t,   m an u f ac tu r in g ,   an d   lo g is tics   [ 8 ] – [ 1 0 ] .  T h is   s tu d y   aim s   to   d esig n ,   d ev el o p ,   an d   ev al u ate  a   p r o to ty p e  s y s tem   th at  d em o n s tr ates  th e  f ea s ib ilit y   an d   p er f o r m an ce   o f   s u c h   in teg r atio n .  T h e  p r o p o s ed   s y s tem   n o t  o n ly   au to m ates  th e  s o r tin g   p r o ce s s   b u t  also   im p r o v es  ad ap tab ilit y   an d   s ca lab ilit y   co m p ar ed   to   r u le - b ased   o r   s en s o r - o n ly   ap p r o ac h es .  T h e  k e y   co n tr ib u tio n s   o f   th is   wo r k   in cl u d e  t h e  d esig n   o f   a  v is io n - b ased   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Ar tif   I n tell     I SS N:   2252 - 8 9 3 8       I n tellig en t o b ject  s o r tin g   s ystem  u s in g   Do b o t m a g icia n   a n d   co mp u ter visi o n   ( To s s a p o l J a n g n o i)   3353   class if icatio n   m o d el,   th e  im p lem en tatio n   o f   an   o b ject - s o r tin g   m ec h a n is m   u s in g   a  r o b o tic  ar m   [ 1 1 ] – [ 1 3 ] ,   an d   th e  ev alu atio n   o f   th e  s y s tem ’ s   p er f o r m an ce   in   r ea l - tim e  s o r ti n g   task s .   Ob ject  d etec tio n   is   a  co n tin u o u s ly   s tu d ied   r esear ch   t o p ic  in   th e  f ield   o f   co m p u ter   v is io n ,   aim in g   to   id en tify   a n d   class if y   o b jects  a cr o s s   s eq u en ce s   o f   f r am es .  De tectin g   o b jects  in   v id eo   s eq u e n ce s   is   p ar ticu lar ly   ch allen g in g   an d   o f ten   r eq u ir e s   s ig n if ican t  p r o ce s s in g   tim e .  Ob ject  d etec tio n   is   g e n er ally   co n s id er ed   t h e  f ir s t   s tep   in   b u ild in g   m o r e  co m p l ex   co m p u te r   v is io n   s y s tem s   [ 1 4 ] ,   [ 1 5 ] .  E ac h   o b ject  p o s s ess es  s ev er al  g lo b al  f ea tu r es,  s u ch   as  co lo r   an d   s h ap e,   wh ich   ca n   b e  u s ed   to   d es cr ib e  its   o v e r all  ch ar ac ter is tic s .  Dete ctin g   o b ject  s h ap es  an d   co lo r s   [ 1 6 ] – [ 1 8 ]   is   a  f u n d am en tal  task   in   co m p u t er   v is io n .  T h is   task   is   ty p icall y   ap p r o ac h ed   u s in g   tr ad itio n al  m eth o d s   with   o p e n   s o u r ce   c o m p u ter   v is io n   lib r ar y   ( O p en C V) ,   d ee p   lear n in g   m o d els  s u ch   as  co n v o l u tio n al  n eu r al   n etwo r k s   ( C NNs ) ,   o b ject  d etec to r s   lik e  y o u   o n l y   lo o k   o n ce   ( YOL O) ,  s in g le  s h o t   d etec to r   ( SS D) ,   a n d   f aster   r e g io n - b ased   co n v o lu tio n al  n e u r al  n etwo r k   ( F aster   R - C NN) ,   as  well  as  h y b r id   tech n iq u es  th at  co m b i n e  tr ad i tio n al  an d   d ee p   lear n in g   a p p r o ac h es .  Ad d itio n ally ,   s p ec ialized   to o ls   s u ch   as  Me d iaPip e,   s cik it - im ag e,   T en s o r Flo w,   an d   Py T o r ch   ar e   o f te n   em p l o y ed .  A  s u m m ar y   o f   th e  co m m o n   m eth o d s   u s ed   f o r   d etec tin g   o b ject  s h ap e  an d   co l o r   is   p r esen ted   i n   T ab le  1 .   R ec en t  ad v an ce s   in   d ee p   lear n in g   h a v e  s ig n if ican tly   im p r o v ed   th e  p e r f o r m an ce   o f   m ac h in e  v is io n   s y s tem s   u s ed   in   o b ject  d etec t io n   an d   class if icatio n   task s .  C NNs   [ 1 9 ] ,   [ 2 0 ]   h av e   d em o n s tr ated   ex ce p tio n al  ac cu r ac y   in   im a g e  class if icatio n ,   m ak in g   th em   well - s u ited   f o r   in d u s tr ial  ap p licatio n s   in v o lv in g   v is u al   r ec o g n itio n .  Sev e r al  s tu d ies  h av e  ex p lo r ed   o b ject  s o r tin g   u s in g   d ee p   lear n i n g   tech n iq u es .  Fo r   ex am p le,   o n e   s tu d y   d ev elo p ed   a  v is io n - b ased   r o b o tic  s y s tem   th at  s o r ts   waste  m ater ials   u s in g   a  C NN   to   class if y   d if f er en t   ty p es  o f   p last ic .  T h e  s y s tem   ac h iev ed   h ig h   class if icatio n   ac cu r ac y   u n d er   co n tr o lled   lig h tin g   co n d itio n s .  Similar ly ,   an o th er   s tu d y   im p lem en ted   a  s o r tin g   m ec h a n is m   f o r   f r u its   b ased   o n   co l o r   an d   s ize,   u s in g   a    YOL O - b ased   m o d el  f o r   r ea l - tim e  d etec tio n   [ 2 1 ] .  I n   te r m s   o f   r o b o tic  in teg r atio n ,   r esear ch er s   h a v e  d em o n s tr ated   s y s tem s   wh er e  a  r o b o tic  ar m   is   g u id e d   b y   i m ag e  r ec o g n itio n   r esu lts   to   m an ip u late  an d   s o r t   o b jects  o n   an   ass em b ly   lin e .  T h ese  s tu d ies  h ig h lig h t  th e  im p o r tan ce   o f   ac cu r ate  o b ject  lo ca lizatio n   an d   th e  r o le  o f   r o b o tic  k in em atics  in   ac h iev in g   ef f icien t  s o r tin g .  Ho wev er ,   m an y   ex is tin g   w o r k s   f o cu s   o n   eith er     co lo r - b ased   o r   s h ap e - b ased   s o r tin g   in d ep en d en tly .  Few  s y s tem s   co m b in e   b o t h   attr ib u tes  to   im p r o v e   class if icatio n   r o b u s tn ess ,   p ar t icu lar ly   in   en v ir o n m en ts   with   v is u ally   s im ilar   o b jects .  Mo r eo v er ,   wh ile  s o m e   s y s tem s   u s e  tr ad itio n al  im ag e  p r o ce s s in g   tech n iq u es  ( e . g . ,   co lo r   th r esh o ld in g   a n d   co n to u r   d etec tio n ) ,   th ese  ap p r o ac h es a r e  o f te n   s en s itiv e  to   n o is e  an d   less   g en e r aliza b le  ac r o s s   v ar y in g   co n d itio n s .   T h is   r esear ch   em p lo y s   a   m et h o d   f o r   d etec tin g   th e  s h a p e  an d   co l o r   o f   o b jects,  f o cu s in g   o n   th r ee   d is tin ct  s h ap es :  cir cle,   s q u ar e,   an d   tr ian g le .  E ac h   s h ap e  is   av ailab le  in   f o u r   c o lo r s :  r ed ,   y ello w,   b lu e,   an d   g r ee n .  T h e  d etec tio n   p r o ce s s   u tili ze s   th e  Op en C V  lib r ar y — s p ec if ically   h u e,   s atu r atio n ,   an d   v alu e   ( HSV )   co lo r   s p ac e   an d   co n to u r   d et ec tio n   tech n i q u es  [ 2 2 ] — a   p o wer f u l  t o o l  wid el y   u s ed   in   co m p u ter   v is io n   ap p licatio n s .   T h e  m o d el  is   c ap ab le  o f   s im u ltan eo u s ly   id e n tify in g   b o th   t h e  s h ap e  a n d   co lo r   o f   o b jects,  en ab lin g   th e  d e v elo p m e n t  o f   a  r ea l - tim e  co n tr o l  s y s tem   f o r   th e  Do b o t  Ma g ician   r o b o tic  ar m   [ 2 3 ] – [ 2 5 ] .  T h is   s y s tem   s u p p o r ts   f ast  an d   ef f icien t  o b ject  s o r tin g   u s in g   ea s ily   ac ce s s ib le  an d   lo w - co s t  r eso u r ce s .   Fu r th er m o r e,   th e  r esear ch   em p h asizes  a  s elf - d ev elo p ed ,   co d e - b ased   a p p r o ac h   u s in g   Py th o n   an d   Op e n C V,   with o u t  r ely in g   o n   p r o p r ietar y   m ac h in e  v is io n   s o f twar e  p r o v id e d   b y   th e  Do b o t  Ma g ician   m an u f ac tu r er .   T ab le  2   p r esen ts   a  co m p ar is o n   o f   p r o g r am m in g   m eth o d s   u s ed   to   co n tr o l th e  D o b o t M ag ician .       T ab le  1 .  Su m m a r y   o f   m eth o d s   f o r   d etec tin g   o b ject  s h ap e  an d   co lo r   M e t h o d   Ea se  o f   u se   A c c u r a c y   B e st   f o r   O p e n C V   (HSV)   +  c o n t o u r s )   Ea sy   M e d i u m   B a si c   s h a p e   a n d   c o l o r   d e t e c t i o n   D e e p   l e a r n i n g   ( C N N s )   C o m p l e x   H i g h   A d v a n c e d ,   p r e c i s e   d e t e c t i o n   H y b r i d   a p p r o a c h   M o d e r a t e   H i g h   B a l a n c e d   s p e e d   a n d   a c c u r a c y       T ab le  2 .  Me th o d s   f o r   co n tr o llin g   Do b o t M ag ician   P r o g r a m mi n g   U se  t e a c h i n g   U se  v i si o n   C o n t r o l l e d   b y   P y t h o n   S u i t a b l e   f o r   P y t h o n   o n l y   No   Y e s   Y e s   A u t o ma t i c   i n s p e c t i o n   s y st e m w i t h   a  c a mera   D o b o t S t u d i o   o n l y   Y e s   No   No   Te a c h i n g - b a se d   t a s k s,   ma n u a l   o p e r a t i o n   H y b r i d   ( m ix )   Y e s   Y e s   Y e s   C a mer a - b a se d   i n s p e c t i o n   f o l l o w e d   b y   t e a c h i n g       2.   CO NCEPT   D E S I G N  AND  CO NT RO L   T h e  p r o p o s ed   o b ject - s o r tin g   s y s tem   in teg r ates  a  class if icati o n   m o d el  with   a  r o b o tic  ar m   to   id en tify   an d   s o r t  o b jects  b ased   o n   th e ir   s h ap e  an d   c o lo r .  T h e  h a r d war e  an d   s o f twar e  c o m p o n en ts   wo r k   to g eth er   t o   f o r m   a  r ea l - tim e  s o r tin g   s y s tem .  T h e  ar ch itectu r al  wo r k f lo w  o f   th is   r o b o tic  o b ject - h an d lin g   s y s tem   is   illu s tr ated   in   Fig u r e  1 .  T h e  u s er   in itiates   o r   co n tr o ls   th e   s o r ti n g   p r o ce s s   v ia   a  p er s o n al   co m p u ter   ( PC ) .  T h e   PC   r ec eiv es  v is u al  in p u t  f r o m   a   ca m er a  th at  d etec ts   th e  p o s itio n   o f   th e   wo r k p iece   [ 2 6 ] .  T h e  im ag e  is   th en   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8 9 3 8   I n t J Ar tif   I n tell ,  Vo l.  15 ,   No .   4 ,  Au g u s t 2 0 2 6 :   3 3 5 2 - 3 3 6 4   3354   p r o ce s s ed ,   an d   co n tr o l c o m m a n d s   ar e  s en t to   th e  Do b o t M ag ician   r o b o tic  ar m .  B ased   o n   th ese  co m m an d s ,   th e  D o b o t M ag ician   p ick s   u p   t h e  d etec ted   wo r k p iece   an d   p lace s   it in to   th e  d esig n ated   wo r k p ie ce   b o x .             Fig u r e  1 .  C o n ce p t o f   t h e  ar ch it ec tu r e  m o d el       2 . 1 .    M ec ha nica l a nd   elec t rica l set up   f o r  t he  Do bo t   M a g ic ia n   T h e  Do b o t   Ma g ician ,   s h o w n   in   Fig u r e  2 ,   is   a  v er s atile  d esk to p   r o b o tic  ar m   eq u ip p ed   with   s tep p er   m o to r s ,   d esig n e d   to   p er f o r m   task s   s u ch   as  p ick - an d - p lace   o p er atio n s   [ 2 7 ] .  I ts   wo r k i n g   p r in cip le  co m b in es   m ec h an ical  m o tio n   c o n tr o l,   s e n s o r s ,   an d   s o f twar e  p r o g r am m in g .  T h e  r o b o tic   ar m   f ea tu r e s   f o u r   jo in ts   ( a x es ) :  b ase  r o tatio n ,   s h o u ld er ,   elb o w,   an d   wr is t  r o tatio n .  E ac h   j o in t  is   p o wer ed   b y   a  s tep p er   m o to r   th at  p r ec is ely   co n tr o ls   its   an g le .  B y   co o r d i n atin g   th ese  m o to r s ,   th e  ar m   ca n   m o v e  its   en d   ef f ec to r   ( to o l )  to   an y   p o s itio n   with in   its   wo r k in g   en v elo p e .   T ab le  3   p r esen ts   th e  wo r k in g   r an g e  a n d   m a x im u m   s p ee d   o f   ea ch   jo i n t  o f   th e   Do b o t  Ma g ician   r o b o tic  ar m .  T h e  r o b o t   f ea tu r es  f o u r   m ain   jo in ts :  b ase  r o tatio n   (J 1 ) ,   s h o u ld er   r o tatio n   (J 2 ) ,  elb o w  r o tatio n   (J 3 ) ,   an d   wr is t r o tatio n   (J 4 ) .           Fig u r e  2 .  R o tatio n   a x es o f   ea c h   jo in t o f   th e  Do b o t  M ag ician   r o b o tic  ar m       T ab le  3 .  Ar ea   a n d   s p ee d   o f   t h e   Do b o t M ag ician   w o r k in g   A x i s   R a n g e   M a x i m u m   sp e e d   B b a se  r o t a t i o n   ( J 1 )   - 1 3 5 °   t o   1 3 5 °   3 2 0   ° / s   S h o u l d e r   r o t a t i o n   ( J 2 )   0 °   t o   8 5 °   3 2 0   ° / s   El b o w   r o t a t i o n   ( J 3 )   - 10 °   t o   9 5 °   3 2 0   ° / s   W r i st   r o t a t i o n   ( J 4 )   90 °   t o   - 90 °   4 8 0   ° / s       2 . 2 .    P r o ce s s   o f   o bje ct   det ec t io n   T h e  s y s tem   s h o wn   in   Fig u r e  3   b eg in s   with   s tep   1 :  in p u t  d e v ice  ( ca m er a / im ag e ) ,   wh e r e  a   ca m er a  o r   im ag e  in p u t  d e v ice  ca p tu r es  im ag es  o f   th e  o b jects  to   b e  d et ec ted   an d   s o r ted .  I n   st ep   2 :  im ag e  p r ep r o ce s s in g ,  th e  ca p tu r ed   im ag es  ar e  r esized   an d   f ilter ed   to   en h a n ce   q u ality   an d   r ed u ce   n o is e,   p r e p ar in g   th em   f o r   f u r th er   an aly s is .  Step   3 :  f ea tu r e  ex t r a ctio n   in v o l v es  ex tr ac tin g   k ey   f ea tu r es  f r o m   th e  o b jects,  s u ch   as  co lo r — u s in g   co lo r   s p ac es  li k e  r e d ,   g r ee n ,   b lu e  ( R GB )   o r   HSV — an d   s h ap e,   d etec te d   th r o u g h   co n to u r   o r   ed g e   d etec tio n   m eth o d s .  I n   s te p   4 :  o b ject  d etec tio n ,   th e  s y s tem   id en tifie s   an d   lo ca tes  th e  o b jects  p r esen t  in   th e  im ag es .  Du r in g   st ep   5 :  o b ject  class if ic atio n ,   th e  d etec ted   o b jects  ar e  class if ied   b ased   o n   l ab els  d ef in ed   b y   th eir   s h ap e   an d   co lo r ,   alo n g   with   th eir   i m ag e  co o r d in ates .  I n   st ep   6 :  co o r d in ate   m ap p i n g ,   th ese  im ag e  co o r d in ates  ar e   co n v er ted   in to   p h y s ical  co o r d in ates  with in   th e  r o b o t ’ s   wo r k in g   ar ea   ( Do b o t  wo r k s p ac e  co o r d in ates ) .   Step   7 :  Do b o t  co n tr o ller   s en d s   co m m an d s   to   th e  D o b o t  r o b o tic  ar m   to   p ick   u p   th e  o b jects  an d   m o v e  th e m   to   d esig n ated   lo ca tio n s .  Fin ally ,   in   st ep   8 :  p h y s ical  s o r tin g ,   t h e  r o b o tic  ar m   p h y s ically   p la ce s   th e  o b jects  in to   s p ec if ic  b in s   o r   lo ca tio n s   ac co r d in g   to   th eir   class if ied   s h ap e  o r   co lo r .   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Ar tif   I n tell     I SS N:   2252 - 8 9 3 8       I n tellig en t o b ject  s o r tin g   s ystem  u s in g   Do b o t m a g icia n   a n d   co mp u ter visi o n   ( To s s a p o l J a n g n o i)   3355       Fig u r e  3 .  B lo ck   d iag r am   o f   s h ap e  an d   c o lo r   o b ject  d etec tio n   u s in g   th e  Do b o t M ag ician   r o b o tic  ar m       2 . 3 .    M et ho ds   f o r  det ec t ing   o bje ct   s ha pe  a nd   co lo r   Dete ctin g   o b ject  s h ap es  an d   c o lo r s   is   a  f u n d am en tal  task   in   co m p u ter   v is io n ,   with   v ar io u s   m eth o d s   av ailab le  d ep en d i n g   o n   th e  r e q u ir ed   co m p lex ity   an d   ac cu r a cy .  T h is   r esear ch   em p lo y s   tr a d itio n al  co m p u te r   v is io n   tech n iq u es  u s in g   Op e n C V  to   id en tify   th e  s h ap e  o f   an   o b ject  ( e . g . ,   cir cle,   tr ia n g le,   s q u ar e )  an d   its   co lo r   ( e . g . ,   r ed ,   g r ee n ,   b lu e,   y ello w ) .   T h e  p r o ce s s   o f   d etec tin g   an   o b ject ’ s   s h ap e  an d   c o lo r   is   as :   i)   R ea d   th e  i m ag e   −   Use c v 2 . im r ea d ( )   to   lo a d   th e  i m ag e .   −   T h e  im ag e  is   r ea d   as a   m atr ix   o f   p ix els in   b lu e,   g r ee n ,   r ed   ( B GR )   co lo r   s p ac e .   ii)   C o n v er t to   g r ay s ca le   −   C o n v er t th e  im ag e   f r o m   B GR   to   g r ay s ca le  u s in g   c v 2 . c v tC o lo r ( im ag e,   cv 2 . C OL OR _ B GR 2 GR AY ).   −   T h is   s im p lifie s   th e  im ag e  b y   r em o v in g   co lo r   i n f o r m atio n ,   m ak in g   s h ap e  d etec tio n   ea s ier .   iii)   B lu r   an d   t h r esh o l d   ( o r   ed g e  d e tectio n )   −   Use c v 2 . Gau s s ian B lu r ()  to   r e m o v e  n o is e  an d   s m o o t h   th e  im ag e .   −   Use c v 2 . th r esh o ld ( )   o r   cv 2 . C a n n y ( )   to   cr ea te  a  b in ar y   im ag e   ( b lack   an d   wh ite ).   −   Ob jects b ec o m e  wh ite .   −   B ac k g r o u n d   b ec o m es b lack .   iv )   Fin d   c o n to u r s   −   Use c v 2 . f in d C o n to u r s ()  to   d et ec t th e  b o u n d ar ies o f   o b jects  ( s h ap es ).   −   C o n to u r s   ar e  cu r v es th at  co n n ec t c o n tin u o u s   p o in ts   ar o u n d   a   s h ap e .   v)   Dete ct  s h ap es   −   Ap p r o x im ate  t h e  co n t o u r   u s in g   cv 2 . a p p r o x Po ly DP ()  to   g et  t h e  n u m b er   o f   co r n er s :   −   3   co r n e r s   →  t r ian g le   −   4   co r n e r s   →  s q u ar e  ( ch ec k   wi d th / h eig h t r atio )   −   Mo r e  th an   4   →  c ir cle  o r   o v al   −   Use c v 2 . b o u n d in g R ec t ()  to   g et   th e  p o s itio n   an d   s ize  f o r   lab el in g .   v i)   Dete ct  c o lo r   −   T ak e  th e  p ix el  v alu es a t th e  ce n ter   o f   t h e  s h ap e  ( o r   av e r ag e  i n s id e  it ).   −   C o n v er t  th e  im ag e  to   HSV  c o lo r   s p ac e  u s in g   cv 2 . cv tC o lo r ( im ag e,   cv 2 . C OL OR _ B G R 2 HSV )  f o r   m o r e  ac cu r ate  co lo r   d etec tio n .   −   Def in e  HSV  r an g es f o r :   −   R ed :  H  ar o u n d   0   o r   1 7 0 – 1 8 0   −   Gr ee n :  H  ar o u n d   6 0   −   B lu e :  H  ar o u n d   1 2 0   −   Yello w :  H  ar o u n d   3 0   −   Use c v 2 . in R an g e ()  to   class if y   co lo r s   b ased   o n   HSV  v alu es .   v ii)   L ab el,   d r aw  a n d   d is p lay   r esu lts   −   Use c v 2 . p u tTe x t ( )   to   wr ite  th e   n am e  o f   th e  s h ap e  a n d   c o lo r   o n   th e  im ag e .   −   Use c v 2 . d r awCo n to u r s ()  to   o u tlin e  th e  s h ap e .     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8 9 3 8   I n t J Ar tif   I n tell ,  Vo l.  15 ,   No .   4 ,  Au g u s t 2 0 2 6 :   3 3 5 2 - 3 3 6 4   3356   2 . 4 .     Co o rdina t e  s y s t em   in met ho d pro po s ed   T h i s   s e c ti o n   d is c u s s es   t h e  c o n c e p t s   a n d   m a t h e m at i c al   f o u n d a t i o n s   o f   c o o r d i n a t e   t r a n s f o r m a t i o n s   [ 2 8 ]   f o r   o b ject  p ic k - an d - p lace   tas k s   u s in g   a   f ix ed   o v er h ea d   ca m er a  with   a   Do b o t   r o b o tic  a r m ,   p a r ticu lar ly   f o r   s o r tin g   o b jects b ased   o n   s h ap e   an d   co lo r .  T h e  ca m er a  ca p t u r es th e  wo r k s p ac e  f r o m   a  to p - d o wn   f ix ed   p o s itio n ,   id en tify in g   o b jects  in   t h e  im a g e  u s in g   p i x el  co o r d in ates .  T o   en ab le   th e   r o b o t  t o   in te r ac t  a cc u r ately   with   th ese   o b jects,  it  is   n ec ess a r y   to   tr an s f o r m   th e  p ix el  co o r d i n ates  in to   r ea l - wo r ld   c o o r d in ates  an d   s u b s eq u en tly   in t o   th e  r o b o t ’ s   c o o r d in ate  f r am e .  A  USB   ca m er a  is   m o u n te d   ab o v e  th e  wo r k s p ac e  t o   ca p tu r e   r ea l - tim e  im ag es  o f   th e  o b jects .  T h is   p r o ce s s   r eq u ir es  p r ec is e  ca m er a  ca lib r atio n   an d   c o o r d in ate  tr an s f o r m a tio n   m eth o d s .  T h e   s etu p   o f   th e  e q u ip m e n t is sh o wn   in   Fig u r e  4 .           Fig u r e  4 .  C o o r d in ate  s y s tem   o f   th e  ex p e r im en t setu p       W h en   u s in g   t h e  Do b o t  Ma g ician   to   p ick   u p   a n   o b ject,   i t  is   ess en tial  to   tr an s f o r m   th e  o b ject' s   co o r d in ates  f r o m   t h e  ca m er a  f r am e  to   th e   r o b o t ’ s   co o r d in ate   s y s tem ,   en ab lin g   p r ec is e  m o v em en t  to   th e  ta r g et  p o s itio n .  Ho m o g e n eo u s   tr an s f o r m atio n   e q u atio n s   ar e  ap p li ed   to   co n v er t  o b ject  p o s itio n s   f r o m   th e  ca m er a  co o r d in ate  s y s tem   to   th e   r o b o t ’ s   co o r d i n ate  s y s tem ,   allo win g   th e  Do b o t  Ma g ician   to   ac cu r ately   p er f o r m     p ick - an d - p lace   task s .  Gen er al ly ,   th r ee   c o o r d in ate  f r a m es  ar e  in v o lv e d :  th e  ca m e r a  f r a m e ,   th e  wo r ld   f r am e ,   an d   th e  r o b o t  f r am e .  T h e  g e n e r al  tr an s f o r m atio n   is   s h o wn   in   ( 1 ) .      =  ←  ∙ ←  ∙    ( 1 )     W h er e       is   p o s itio n   o f   th e   o b ject  in   ca m e r a  c o o r d i n ates ,   ←    is   tr an s f o r m atio n   m atr ix   f r o m   ca m er a  f r am e  to   wo r ld   f r am e ,   ←    is   tr an s f o r m atio n   f r o m   wo r l d   f r am e  to   r o b o t  f r am e ,   an d        is   o b ject  p o s itio n   in   r o b o t  c o o r d in ates  ( in p u t   f o r   th e   r o b o t ).   E ac h   tr an s f o r m atio n   m atr ix   is   a   4 ×4   h o m o g e n eo u s   m atr ix ,   as sh o wn   in   ( 2 ) .     = [ 0 1 ]   ( 2 )     W h er e     =3 × 3   r o tatio n   m atr ix   ( o r ien tatio n   b etwe en   f r am es) ,    =3 × 1   tr an s latio n   v ec to r   ( p o s itio n   o f f s et   b etwe en   f r am es) .     2 . 5 .     P y t ho n c o de  f o r  im plementa t io n o f   pro ce s s   Usi n g   P y D o b o t  in v o lv es  wr itin g   Py th o n   p r o g r am s   [ 2 9 ]   t o   c o n tr o l  th e  D o b o t  Ma g ician   r o b o tic  ar m   v ia  a  s er ial  ( C OM )  p o r t .  I t  allo ws  u s er s   to   m o v e  t h e  ar m   t o   s p ec if ic  p o s itio n s ,   s et  m o v em en t  s p ee d s ,   tu r n   th e   s u ctio n   cu p   o n   o r   o f f ,   an d   r e ad   th e  cu r r en t  p o s e  o f   th e  ar m .  T h is   m ak es  it  ea s y   to   au t o m ate  task s   with   th e  Do b o t  with o u t  r ely in g   o n   th e  Do b o tSt u d io   s o f twar e .  T o   co n n ec t  Do b o t  Ma g ician   u s in g   a  m an u ally   s p ec if ied   p o r t in   Py Do b o t ,   s im p ly   p ass   th e  p o r t  n am e  d i r ec tly   wh en   c r ea tin g   th e  Do b o t o b ject :     fr om   pydo b ot   im por t  Do b ot   de vic e  =  Do b o t ( p o r t =" C OM5 ")     #   R e p la ce   C OM5   w ith   yo u r   a ctu a l p o r t     T h is   estab lis h es a   s er ial  co n n ec tio n   b etwe en   y o u r   Py t h o n   s cr ip t a n d   th e  D o b o t M ag ician   u s in g   s p ec if ied   p o r t .     Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Ar tif   I n tell     I SS N:   2252 - 8 9 3 8       I n tellig en t o b ject  s o r tin g   s ystem  u s in g   Do b o t m a g icia n   a n d   co mp u ter visi o n   ( To s s a p o l J a n g n o i)   3357   3.   M E T H O DO L O G Y   AND  M AT E RIA L   T h is   s ec tio n   o u tlin es  th e  s y s te m   wo r k f lo w  an d   th e  s etu p   o f   eq u ip m en t  u s ed   in   th e  ex p er i m en t .  T h e  Do b o t  Ma g ician   is   co n tr o lled   u s in g   a  p r o g r am   wr itten   in   Py th o n   a n d   Op en C V,   u tili zin g   th e  Py Do b o t   lib r ar y .  T h e  ex p e r im en tal  p r o ce d u r e  is   ca r r ied   o u t in   th e  f o llo win g   s t ep s :     3 . 1 .   Set t ing   o f   t he  re la t io n o f   co o rdina t es   T h e  f ir s t  s tep   in v o lv es  ca lib r a tin g   th e  ca m er a   co o r d in ates,  t h e  s u r f ac e  co o r d i n ates  wh er e  th e  o b jects   ar e  p lace d ,   a n d   th e  s u ctio n   h ea d   p o s itio n   o f   th e  Do b o t to   en s u r e  th ey   alig n   co r r ec tly .  T h is   i s   d o n e  b y   wr itin g   a   Py th o n   p r o g r am   an d   s av in g   i t  in   a   f o l d er   f o r   co n tin u o u s   u s e  in   c o lo r   an d   s h ap e   d etec tio n .  As  s h o w n   in     Fig u r e  5 ,   th e  co o r d in ate  m ap p in g   p r o ce s s   in v o lv es  id en tify in g   th e  ca m er a' s   p r o jecte d   p o in ts   o n   th e  s u r f ac e   an d   m o v in g   th e   Do b o t' s   s u ctio n   h e ad   t o   th o s e   p o in ts .  A   to tal  o f   f o u r   p o in ts   is   u s ed ,   a n d   th e  d ata  is   s av ed   u s in g   a  m eth o d   ca lled   th e  h o m o g r ap h y   m atr i x .           Fig u r e  5 .  T h e  ca lib r atin g   o f   ca m er a  an d   d o b o t h ea d   co o r d in a tes f o u r   p o in t       3 . 2 .    Wo r k piece  p la ce m ent   First,  o p en   t h e  Do b o tSt u d io   p r o g r am .  T h e n ,   a r r an g e  th e   wo r k p iece s — f ea tu r in g   all  f o u r   c o lo r s   an d   th r ee   s h ap es — in   t h e  d esire d   p o s itio n s   with in   th e   r ea c h ab le   ar ea   o f   th e   r o b o tic  ar m   to   en s u r e  it  ca n   o p er ate   with o u t  er r o r s .  Fig u r e  6   illu s tr ates  th e  ar r a n g em en t   o f   th e   wo r k p iece s .  Fig u r e  6 ( a )  s h o ws  t h e  p lace m e n t  o f   th e   wo r k p iece s   o n   th e  ta b le  s u r f a ce .  Fig u r e  6 ( b )  d em o n s tr ates  h o w  to   u s e  th e  Do b o tSt u d io   p r o g r a m   to   p o s itio n   th e  r o b o tic  a r m   o v er   ea ch   wo r k p iece   an d   s av e   th e   p o s itio n   v alu es  at  th o s e  s p ec if ic   p o in ts .  Fig u r e  6 ( c )  s h o ws  h o w  th e  ( x ,   y )  co o r d in ates o f   e ac h   wo r k p iece   ar e  en ter e d   in to   th e  cu s to m - d e v elo p e d   p r o g r a m .             ( a)   ( b )   ( c)     Fig u r e  6 .  Ar r an g em e n t a n d   lo ca lizatio n   o f   wo r k p iece s :  ( a )  w o r k p iece   p o s itio n s   o n   th e  ta b le  s u r f ac e ,     ( b )  p o s itio n in g   th e  D o b o t' s   s u ctio n   h ea d   o v er   ea c h   wo r k p iec e  to   r ec o r d   co o r d in ates ,   an d   ( c )  e n ter in g   p o s itio n   d ata  in to   th e  Py th o n   p r o g r am   f o r   im p lem en tatio n       3 . 3 .     P r o g ra m   e x ec utio n t esting   B ef o r e  s tar tin g   ea ch   o p e r atio n ,   th e   Do b o tSt u d i o   p r o g r am   m u s t  b e  o p en ed   to   s et  th e   r o b o t   to   its   h o m e   p o s itio n .  On ce   th is   is   d o n e ,   cl o s e  th e  p r o g r a m   an d   r u n   t h e  m o d u le  i n   th e   Py th o n   p r o g r a m .  T h e   in ter f ac e   will  Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8 9 3 8   I n t J Ar tif   I n tell ,  Vo l.  15 ,   No .   4 ,  Au g u s t 2 0 2 6 :   3 3 5 2 - 3 3 6 4   3358   d is p lay   two   s ec tio n s :  o n e  f o r   co lo r   an d   s h a p e  d etec tio n ,   a n d   th e  o th e r   f o r   s tar t / s to p   b u tto n   co n tr o ls ,   alo n g   with   a  tab le  th at  lo g s   th e  n u m b er   o f   item s   s o r ted ,   as sh o wn   i n   Fig u r e  7 .           Fig u r e  7 .  Settin g   u p   th e  D o b o t Stu d io   p r o g r am   t o   m o v e  th e  r o b o tic  ar m   t o   th e  h o m e  p o s itio n       3 . 4 .     St a rt ing   t he  pro g r a m   f o r  pick - a nd - pla ce   o pera t io ns   B ef o r e  o p er atin g   th e  s y s tem ,   th e  p o s itio n s   f o r   p lacin g   th e  o b jects  m u s t  f ir s t  b e  d ef in ed ,   as  illu s tr ated   in   Fig u r e   6 ( a ) .   T h e  Do b o tSt u d io   p r o g r am   was  u s ed   to   m a n u ally   m o v e   th e  r o b o tic  ar m   to   ea ch   p r e d ef in ed   o b ject  p o s itio n .  T h ese  co o r d i n ates  wer e  th en   en te r ed   in to   a  cu s to m - d ev el o p ed   ap p licati o n .  On ce   t h e  s etu p   was c o m p lete,   th e  s tar t b u tto n   was p r ess ed   to   in it iate  th e  p r o ce s s .  T h e  p r o g r am   was d esig n ed   to   d etec t o b jects  b ased   o n   th ei r   co lo r   an d   s h a p e   an d   in clu d es th e  f o llo win g   k e y   f ea tu r es :   −   Ab ilit y   to   click   two   p o i n ts   to   d ef in e  th e  p ick u p   z o n e   −   Vis u al  f ee d b ac k   with   a  g r ee n   b o r d er   d u r in g   z o n e  s elec tio n   −   Dis p lay   o f   a  p u r p le  b o r d e r   o n c e  th e  p ick u p   zo n e  is   s et   −   B u tto n s   f o r   e x p o r t  co m m a - s ep ar ated   v alu es ( C SV ) ,  r eset c o u n t,  an d   r eset p ick u p   ar ea   −   C ap ab ilit y   to   s av e  th e  p ick u p   zo n e  to   a  f ile  n am ed   p ick u p _ a r ea . js o n   −   Use  o f   a  h o m o g r ap h y   m atr ix   ( h o m o g r ap h y _ m atr i x . n p y )  to   c o n v er t  b etwe en   p ix el  co o r d in a tes  an d   r o b o t   co o r d in ates   −   I n teg r atio n   with   Py Do b o t   f o r   co n tr o llin g   t h e  Do b o t in   au to m ated   p ick - a n d - p lace   o p e r atio n s       4.   RE SU L T S AN D  D I SCU SS I O N   4 . 1 .     E x perim ent a l  r esu lt s   T h e  d ataset  co m p r is es  v ar io u s   o b jects  wi th   d if f er en t  s h ap es  ( e . g . ,   cir cles,  s q u ar es,  tr ia n g les )  an d   co lo r s   ( e . g . ,   r e d ,   g r ee n ,   b lu e ) .   T h e  im ag es  wer e   co llected   u n d er   v ar y in g   lig h tin g   co n d iti o n s   to   en h an ce   t h e  m o d el' s   g en er aliza tio n   ca p ab il ity .  E a ch   i m a g e   i n cl u d es   b o t h   s h a p e   a n d   c o l o r   att r i b u tes ,   as  s h o wn   i n   F ig u r e   8 .   T h e  p r el im i n ar y   tes ti n g   o f   t h e   o b je ct  s h ap e  a n d   c o l o r   d e te cti o n   p r o g r a m   was   c ar r i ed   o u t,   as   s h o wn   i n   Fi g u r e  9 .           Fig u r e  8 .  W o r k p iece s   f ea tu r in g   4   co l o r s   an d   3   s h ap es   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Ar tif   I n tell     I SS N:   2252 - 8 9 3 8       I n tellig en t o b ject  s o r tin g   s ystem  u s in g   Do b o t m a g icia n   a n d   co mp u ter visi o n   ( To s s a p o l J a n g n o i)   3359           Fig u r e  9 .  Ob ject  d etec tio n   b y   s h ap e  an d   c o lo r   u s in g   HSV  an d   Op en C V       I llu s tr ated   in   Fig u r e  1 0   is   a   s cr ee n s h o t  tak en   f r o m   a  v i d eo   d em o n s tr atin g   th e  o p er a tio n   o f   th e   au to m atic  s o r tin g   s y s tem   f o r   wo r k p iece s   with   th r ee   s h ap es  an d   f o u r   co lo r s .  T h e  p r o ce s s   b eg in s   b y   lau n ch i n g   th e  cu s to m - d ev elo p ed   Py th o n   p r o g r a m .  Nex t,  th e  Do b o tSt u d io   s o f twar e  is   u s ed   to   m o v e  th e  r o b o tic  ar m   to   th e  h o m e  p o s itio n .  Af ter   th at,   th e  Py th o n   p r o g r am   is   ex ec u ted .  W h en   th e  ca m er a  d etec ts   a  wo r k p iece   with   a  s p ec if ic  s h ap e  an d   co lo r   with in   th e  d ef i n ed   ar ea ,   it  d r aws  a  b o u n d in g   b o x   ar o u n d   th e  o b ject  an d   m a r k s   its   ce n ter   p o in t .  T h e  co o r d in ates  ar e  th en   s en t  to   th e  r o b o tic  ar m ,   wh ich   m o v es  to   p ick   u p   th e  o b ject  an d   p lace   it  in   a  p r ed ef in ed   lo ca tio n .  T h e  s y s tem   co n tin u es o p er atin g   u n til th er e  ar e  n o   m o r e  wo r k p iece s   in   th e  d esig n ated   ar ea   o r   th e   p r o g r am   is   m an u ally   s to p p ed .                           Fig u r e  1 0 .   Actu al  m o v e m en t o f   th e  Do b o t  Ma g ician   d u r in g   o b ject  s o r tin g       T ab le  4   s h o ws  th e  r esu lts   o f   t h e  Do b o t  Ma g ician ’ s   w o r k p ie ce   g r asp in g   test ,   wh ich   in d ica te  th at  th e   r o b o t  s u cc ess f u lly   g r asp e d   all  o b jects  in   ev er y   tr ial .  T h e  ac c u r ac y   r an g ed   f r o m   9 5 . 0 %  to   9 9 . 2 % ,   with   th e  r e d   tr ian g le  ac h iev i n g   th e   h ig h est  ac cu r ac y   o f   9 9 . 2 %.  T h e  g r asp in g   tim es  v ar ied ,   f r o m   1 1 . 7 6   s ec o n d s   f o r   th e   r ed   tr ian g le  to   1 5 . 0 2   s ec o n d s   f o r   th e  g r ee n   s q u a r e .  Ad d itio n al ly ,   th e  r o b o t ’ s   p er f o r m an ce   r em ain ed   co n s is ten t   ac r o s s   d if f er en t sh ap es a n d   co l o r s ,   with   p ick   p o s itio n s   v ar y in g   s lig h tly   f o r   ea ch   o b ject .   T h is   b ar   ch ar t  in   Fig u r e  1 1   s h o ws  th e  av er ag e  ac cu r ac y   p er ce n tag es  ca teg o r ized   b y   c o lo r   an d   s h ap e .  Fo r   ea ch   co lo r — b lu e,   g r ee n ,   r ed ,   an d   y ello w — th e  av er a g e  ac cu r ac y   is   p r esen ted   f o r   t h r ee   s h ap es :  cir cle,   s q u ar e,   an d   tr ian g le .  Ov e r all,   th e  ac c u r ac y   v alu es  ar e   v er y   clo s e  ac r o s s   all  g r o u p s ,   with   m o s t  s h ap es   ac h iev in g   a b o v e  9 5 %  ac cu r a cy .  T r ian g les  g en er ally   h av e  th e  h ig h est  av er a g e  ac cu r ac y   with in   ea ch   co lo r   g r o u p ,   f o llo wed   clo s ely   b y   s q u ar es  an d   cir cles .  T h e  c h ar t  s u g g ests   th at   ac cu r ac y   i s   co n s is ten tly   h ig h   r eg ar d less   o f   co l o r   o r   s h ap e,   w ith   o n ly   s lig h t v a r iatio n s .       Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8 9 3 8   I n t J Ar tif   I n tell ,  Vo l.  15 ,   No .   4 ,  Au g u s t 2 0 2 6 :   3 3 5 2 - 3 3 6 4   3360   T ab le  4 .   R esu lts   o f   Do b o t  Ma g ician ’ s   wo r k p iece   g r asp in g   test   ac co r d in g   to   s h ap e  an d   co lo r   C o l o r   S h a p e   C o u n t   S u c c e ss   Ti me   ( s )   A c c u r a c y   ( %)   P i c k   p o s i t i o n   R e d   S q u a r e   1   Y e s   14 . 31   97 . 8   ( 2 1 9 ,   - 1 5 5 )   B l u e   C i r c l e   1   Y e s   14 . 35   96 . 1   ( 2 7 0 ,   - 1 2 7 )   G r e e n   C i r c l e   1   Y e s   12 . 98   98 . 6   ( 2 7 3 ,   - 1 1 7 )   B l u e   S q u a r e   1   Y e s   14 . 35   98 . 2   ( 2 0 6 ,   - 1 4 8 )   R e d   C i r c l e   1   Y e s   14 . 56   95 . 2   ( 2 1 2 ,   - 1 4 4 )   Y e l l o w   S q u a r e   1   Y e s   13 . 71   97 . 4   ( 2 6 8 ,   - 1 2 0 )   R e d   Tr i a n g l e   1   Y e s   13 . 39   96 . 5   ( 2 7 5 ,   - 1 3 0 )   Y e l l o w   Tr i a n g l e   1   Y e s   13 . 07   95 . 9   ( 2 7 4 ,   - 1 3 2 )   G r e e n   Tr i a n g l e   1   Y e s   12 . 71   97 . 4   ( 2 4 1 ,   - 72 )   Y e l l o w   C i r c l e   1   Y e s   12 . 04   95 . 7   ( 2 6 3 ,   - 71 )   G r e e n   Tr i a n g l e   2   Y e s   13 . 43   96 . 3   ( 2 9 0 ,   - 1 4 4 )   B l u e   Tr i a n g l e   1   Y e s   12 . 04   97 . 3   ( 2 3 5 ,   - 98 )   B l u e   C i r c l e   2   Y e s   12 . 10   97 . 6   ( 2 6 2 ,   - 73 )   R e d   Tr i a n g l e   2   Y e s   13 . 02   99 . 2   ( 2 6 4 ,   - 1 4 4 )   R e d   S q u a r e   2   Y e s   13 . 95   95 . 6   ( 2 7 1 ,   - 1 4 6 )   G r e e n   S q u a r e   1   Y e s   15 . 02   98 . 4   ( 2 1 1 ,   - 1 5 7 )   G r e e n   C i r c l e   2   Y e s   13 . 35   98 . 1   ( 2 0 9 ,   - 92 )   B l u e   S q u a r e   2   Y e s   13 . 29   97 . 1   ( 2 6 7 ,   - 86 )   Y e l l o w   S q u a r e   2   Y e s   12 . 40   96 . 2   ( 2 6 6 ,   - 1 4 9 )   R e d   C i r c l e   2   Y e s   14 . 32   96 . 8   ( 2 8 5 ,   - 1 4 3 )   G r e e n   Tr i a n g l e   3   Y e s   13 . 05   98 . 9   ( 2 2 5 ,   - 93 )   Y e l l o w   C i r c l e   2   Y e s   13 . 33   96 . 2   ( 2 8 0 ,   - 1 3 9 )   Y e l l o w   Tr i a n g l e   2   Y e s   13 . 66   96 . 6   ( 2 3 7 ,   - 1 4 8 )   R e d   Tr i a n g l e   3   Y e s   13 . 62   97 . 2   ( 1 5 8 ,   - 1 3 6 )   B l u e   Tr i a n g l e   2   Y e s   12 . 66   97 . 6   ( 2 1 5 ,   - 1 6 0 )   R e d   S q u a r e   3   Y e s   13 . 04   98 . 3   ( 2 6 4 ,   - 70 )   G r e e n   C i r c l e   3   Y e s   13 . 32   95 . 9   ( 2 6 2 ,   - 74 )   R e d   Tr i a n g l e   4   Y e s   11 . 76   98 . 4   ( 2 6 7 ,   - 77 )   G r e e n   Tr i a n g l e   4   Y e s   13 . 03   96 . 1   ( 2 0 9 ,   - 1 4 7 )   B l u e   S q u a r e   3   Y e s   14 . 26   97 . 0   ( 2 7 2 ,   - 1 3 2 )   R e d   C i r c l e   3   Y e s   13 . 96   95 . 0   ( 2 6 8 ,   - 1 2 5 )   B l u e   C i r c l e   3   Y e s   14 . 09   96 . 3   ( 2 7 6 ,   - 1 3 6 )   Y e l l o w   S q u a r e   3   Y e s   13 . 12   98 . 4   ( 2 0 7 ,   - 74 )   G r e e n   S q u a r e   2   Y e s   14 . 58   97 . 9   ( 2 7 0 ,   - 1 3 5 )   Y e l l o w   C i r c l e   3   Y e s   13 . 72   95 . 9   ( 2 1 4 ,   - 1 3 3 )   B l u e   Tr i a n g l e   3   Y e s   13 . 08   99 . 1   ( 2 0 9 ,   - 1 5 9 )   Y e l l o w   Tr i a n g l e   3   Y e s   12 . 41   96 . 4   ( 2 6 3 ,   - 72 )           Fig u r e  1 1 .  Av er ag e  a cc u r ac y   b y   co lo r   an d   s h ap e       Fig u r e  1 2   s h o ws  th e   av er a g e   tim e  tak en   f o r   ea c h   task ,   ca teg o r ized   b y   co lo r   an d   s h ap e .  T h e   f o u r   m ain   co lo r s   ar e  b lu e,   g r ee n ,   r ed ,   an d   y ello w .  Fo r   ea ch   c o lo r ,   th e  av er ag e  tim es  f o r   th r ee   s h ap es — cir cle,   s q u ar e,   a n d   t r ian g le — ar e  d is p lay ed .  Ov e r all,   s q u a r es  ten d   t o   tak e   th e  l o n g est  tim e,   esp ec ially   f o r   th e   g r ee n   an d   b l u e  co lo r s .  T r ian g les  g en er ally   r eq u ir e  th e   s h o r test   tim e   ac r o s s   m o s t  co lo r s ,   ex ce p t   f o r   r ed ,   wh er e  cir cles   tak e  th e  lo n g est  tim e .  I n   y ello w,   th e  av er ag e  tim es  f o r   all  th r ee   s h ap es  ar e  q u ite  s im ilar .  T h is   ch ar t  h ig h lig h ts   h o w  th e  tim e  tak e n   v ar ies d e p en d in g   o n   b o th   s h ap e   an d   c o lo r .   Fig u r e  1 3   s h o ws  th e  r elatio n s h ip   b etwe en   ac cu r ac y   an d   ti m e  tak en ,   with   ea ch   p o i n t  r ep r esen tin g   a  d ata  s et  ca teg o r ized   b y   co lo r   an d   s h a p e .  T h e  s ize  o f   ea ch   p o in t  in d icate s   t h e  c o u n t,   o r   h o w  m an y   tim es  th at   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Ar tif   I n tell     I SS N:   2252 - 8 9 3 8       I n tellig en t o b ject  s o r tin g   s ystem  u s in g   Do b o t m a g icia n   a n d   co mp u ter visi o n   ( To s s a p o l J a n g n o i)   3361   d ata  s et  o cc u r s .  Gen er ally ,   d ata  p o in ts   with   a  tim e  o f   less   th an   2   s ec o n d s   ten d   to   h a v e  h ig h er   ac c u r ac y .  T r ian g les  m o s tly   s h o w  h ig h   a cc u r ac y   with   s h o r ter   tim es,  w h ile  s q u ar es  ten d   to   tak e  l o n g er   an d   o f ten   h av e   lo wer   ac cu r ac y .  L ar g er   p o in ts ,   in d icatin g   h ig h e r   co u n ts ,   ar e   s p r ea d   ac r o s s   lo n g er   tim e  r an g es  with   m o d er at e   to   lo wer   ac cu r ac y .  T h is   s u g g e s ts   th at  tak in g   m o r e  tim e  d o es  n o t n ec ess ar ily   r esu lt in   b etter   ac cu r ac y .           Fig u r e  1 2 .  Av er ag e  tim e   b y   c o lo r   an d   s h a p e           Fig u r e  1 3 .  Acc u r ac y   v s   tim e  o f   co lo r ,   s h ap e ,   an d   co u n t       4 . 2 .     Dis cus s io n   On e  o f   t h e  m ain   ad v a n tag es  i s   m o r e  ac cu r ate  co lo r   s ep ar ati o n   co m p ar ed   to   R GB ,   as  HSV  s ep ar ates   co lo r   in f o r m atio n   f r o m   b r i g h t n ess .  T h is   allo ws  f o r   m o r e   p r ec is e  co lo r   d etec tio n ,   e v en   u n d er   u n ev en   lig h tin g   co n d itio n s .  T h e  h u e   co m p o n e n t  s p ec if ically   r ep r esen ts   th e  m ain   co lo r   ( e . g . ,   r ed ,   g r ee n ,   b l u e ) ,   m ak i n g   it  ea s ier   to   class if y   o b jects  b y   c o lo r .  An o th er   ad v an tag e   is   f ast  p r o ce s s in g   with   Op en C V,   wh ich   p r o v id es  b u ilt - in   f u n ctio n s   s u ch   as  cv 2 . i n R an g e  () ,   c v 2 . f i n d C o n to u r s   () ,   an d   cv 2 . a p p r o x Po ly DP  ( ) .   T h ese   to o ls   en ab le  r ap id   an d   ef f icien t  d etec tio n   o f   b o t h   co lo r   a n d   s h ap e .  HSV  an d   Op en C V  also   s u p p o r t  ac cu r ate  s h ap e  d etec tio n .  B asic  g eo m etr ic  s h ap es  lik e  ci r cles,  s q u ar es,  an d   tr ian g les  ca n   b e  id en tifie d   b y   an al y zin g   o b ject  co n to u r s   an d   co u n tin g   th e  n u m b er   o f   v er tic es .  Fo r   ex am p le,   a   s h ap e  with   3   v er tices  is   class if ied   as  a  tr i an g le,   4   v er tices  as  a  s q u ar e,   an d   a  s m o o th ,   cu r v e d   co n to u r   as  a  cir cle .  T h e  s y s t em   is   also   ea s y   to   im p lem en t w ith o u t  th e  n ee d   f o r   AI   m o d els,  m ak in g   it   id ea l   f o r   em b e d d ed   ap p licatio n s   an d   r ea l - tim e  r o b o tic  s y s tem s ,   s u ch   as  th o s e   u s in g   th e   Do b o t  r o b o tic  ar m .  L astl y ,   HSV - b ased   d etec tio n   o f f er s   f lex i b ilit y ,   as  u s er s   ca n   ad ju s t  th e  HSV  r an g e  to   ad ap t   to   d if f er en t  lig h tin g   c o n d itio n s .  T h is   tu n in g   h elp s   m ai n tain   h ig h   d etec tio n   ac c u r ac y   in   v a r io u s   en v ir o n m en ts .   T h e  ac cu r ac y   o f   o b ject  d etec tio n   u s in g   HSV  an d   Op e n C V  d ep en d s   o n   s ev er al  k ey   f ac t o r s ,   in clu d in g   lig h tin g   co n d itio n s ,   ca m e r a  q u ality ,   HSV  r an g e  s ettin g s ,   an d   th e   clar ity   o f   th e  o b ject ’ s   s h ap e .   B ased   o n   ty p ical  ex p e r im en ts   an d   r ea l - wo r ld   ap p licatio n s :   i)   C o lo r   d etec tio n   ( HSV )   −   Un d er   n o r m al  lig h tin g :  ac cu r a cy   r an g es f r o m   9 0 – 98 % .   −   Un d er   v ar ia b le  lig h tin g   o r   wit h   s h ad o ws :  ac cu r ac y   d r o p s   to   8 0 – 90 % .   −   W ith   well - ca lib r ated   HSV  r an g es a n d   co n tr o lled   lig h tin g ,   ac cu r ac y   ca n   r ea ch   u p   to   9 9 % .   Evaluation Warning : The document was created with Spire.PDF for Python.