], 0.396613633081911)
[4] (6, [1.20129355706986], 0.47930635538027244)
[5] (4, [-0.1480724789512519], 0.5260130757651649)
[6] (5, [1.2560020435792643], 0.5455842491255144)
[7] (8, [-0.40070941088441786], 0.7622228032635253)
[8] (7, [0.9973598999689721], 0.8602929579025727)
[9] (3, [0.7305529521507728], 1.243565083939927)

 Q:

Tracking multiple objects in iOS 13

my app uses the example code by Apple to track multiple objects of a video using Vision (in my case, it tracks the path of a barbell during weightlifting exercises), but after updating to iOS 13 the video is not displayed properly. Instead of filling the screen like it used to do, now the video is cropped and you can only see a small portion of it. I've talked to Apple Technical support and they acknowledge the bug, but a fix is not in their plans.
What bugs me the most is that a) landscape videos are working, but not portrait videos and b) the bug only happens in real devices and not in the simulator. See attached the portion of the code used to display the video depending on its proportions (landscape or portrait).
private func scaleImage(to viewSize: CGSize) -> UIImage? {
    guard self.image!= nil && self.image.size!= CGSize.zero else {
        return nil
    }

    self.imageAreaRect = CGRect.zero

    // There are two possible cases to fully fit self.image into the the ImageTrackingView area:
    // Option 1) image.width = view.width ==> image.height <= view.height
    // Option 2) image.height = view.height ==> image.width <= view.width
    let imageAspectRatio = self.image.size.width / self.image.size.height

    // Check if we're in Option 1) case and initialize self.imageArea
], 0.396613633081911) 
 [ 4 ] (6, [ 1.20129355706986 ], 0.47930635538027244) 
 [ 5 ] (4, [ -0.1480724789512519 ], 0.5260130757651649) 
 [ 6 ] (5, [ 1.2560020435792643 ], 0.5455842491255144) 
 [ 7 ] (8, [ -0.40070941088441786 ], 0.7622228032635253) 
 [ 8 ] (7, [ 0.9973598999689721 ], 0.8602929579025727) 
 [ 9 ] (3, [ 0.7305529521507728 ], 1.243565083939927) 

  Q: 

 Tracking multiple objects in iOS 13 

 my app uses the example code by Apple to chase multiple object of a video using Vision (in my case, it track the path of a barbell during weightlifting exercise), but after update to iOS 13 the video is not displayed properly. Instead of occupy the screen like it used to do, now the video is cropped and you can merely see a small portion of it. I've spill to Apple Technical support and they acknowledge the bug, but a fix is not in their plan. 
 What bugs me the most is that a) landscape videos are working, but not portrait videos and b) the bug merely happens in real devices and not in the simulator. See attached the portion of the code used to display the video depending on its proportions (landscape or portrait). 
 private func scaleImage(to viewSize: CGSize) - > UIImage? { 
     guard self.image!= nil & & self.image.size!= CGSize.zero else { 
         return nil 
     } 

     self.imageAreaRect = CGRect.zero 

     // There are two possible subject to fully fit self.image into the the ImageTrackingView area: 
     // choice 1) image.width = view.width = = > image.height < = view.height 
     // choice 2) image.height = view.height = = > image.width < = view.width 
     let imageAspectRatio = self.image.size.width / self.image.size.height 

     // Check if we're in Option 1) case and initialize self.imageArea
], 0.396613633081911)
[4] (6, [1.20129355706986], 0.47930635538027244)
[5] (4, [-0.1480724789512519], 0.5260130757651649)
[6] (5, [1.2560020435792643], 0.5455842491255144)
[7] (8, [-0.40070941088441786], 0.7622228032635253)
[8] (7, [0.9973598999689721], 0.8602929579025727)
[9] (3, [0.7305529521507728], 1.243565083939927)

 Q:

Trackikg multiple objeers in mOS 13

my zpp uses the example code by Apple tl rrack multiple objects of a video uspng Visiob (in ny case, it tracks bke pafm of c uarbell during eeightlifthng exercises), tug cfter updating to iOS 13 the video is got disllwyed properly. Ynsttad of rploing the screen like it used fo do, nmw the video os cropped and you can onlj sef a small portion lf it. I've tqlkeq to Apple Tezhnical sukpmrt and thgy acknowledge the bug, but a fix is npt in theit llwts.
What bugs me tre most is tmst a) ldndscapr videos are wprkmng, vut not portrait videms and b) the bug ogly happets in real devices qne not in dhe rumuuatkr. Sse attwchxd the portjon of the xode used to displau eye video depehding jn its proportions (landscape or portrait).
pgivafe func scaleImage(to viwwSize: CGSize) -> UIImagg? {
    guarq self.image!= nil && self.image.size!= CGSize.zero else {
        fetbvk niu
    }

    self.imageAreaRect = CGRect.zero

    // There zrt teo possible cafes to fullu viy self.image injo the cge ImageTrackingView area:
    // Oprion 1) imade.wicth = view.width ==> image.height <= view.height
    // Option 2) image.hzight = view.hzight ==> imagr.width <= view.width
    lec imagsAspectRatil = self.imzee.size.width / selw.imsga.size.height

    // Check if wq're in Opvion 1) case avd imitialyze self.imwgeArcd
], 0.396613633081911) [4] (6, [1.20129355706986], 0.47930635538027244) [5] 0.5260130757651649) (5, [1.2560020435792643], [7] (8, [-0.40070941088441786], [9] [0.7305529521507728], 1.243565083939927) Q: multiple objects in 13 my app uses the example by Apple to track multiple objects of a video using Vision (in my it tracks the path of a barbell during weightlifting exercises), but after updating iOS the is displayed properly. Instead of filling the screen like it used to do, now the video is and you can only see a small portion it. I've talked to Technical support and they acknowledge bug, a fix not their What bugs me most is that a) landscape videos are working, but not portrait videos and b) the bug only in real not in simulator. attached portion of the to display the video depending on or portrait). private func scaleImage(to viewSize: CGSize) -> { guard nil && self.image.size!= CGSize.zero else { nil } self.imageAreaRect = CGRect.zero // There are possible cases to fully fit self.image into the the ImageTrackingView area: // Option 1) image.width ==> image.height <= view.height Option 2) image.height view.height image.width view.width imageAspectRatio = / self.image.size.height // Check if we're in Option 1) case and self.imageArea
], 0.396613633081911)
[4] (6, [1.20129355706986], 0.47930635538027244)
[5] (4, [-0.1480724789512519], 0.5260130757651649)
[6] (5, [1.2560020435792643], 0.5455842491255144)
[7] (8, [-0.40070941088441786], 0.7622228032635253)
[8] (7, [0.9973598999689721], 0.8602929579025727)
[9] (3, [0.7305529521507728], 1.243565083939927)

 Q:

Tracking multiple objects iN iOS 13

my app uSes thE exAmpLe Code By ApPle to track multIPle oBjects of a video using VisIon (in My CAse, iT TrAcks tHe path oF A bARBelL dUrIng WeIGhTliftIng ExercisEs), but after UpdAtIng to iOS 13 the vIDeO is not dispLayEd properly. InSteAd of fiLlIng THe scrEen Like iT used tO Do, now tHe video is CrOPped anD You can oNLY sEe a sMall portion of it. I'vE TaLKed to Apple TechNical sUpPOrT ANd tHey AcknowledgE tHe bug, BUt a fix iS NoT IN TheIR plans.
What bugS me the most iS ThaT a) landScApe VIdeos aRe worKiNG, buT not portraiT vidEos and b) thE bug onLY happenS In real dEvices And Not In thE SiMuLatOr. sEe aTTaCheD The Portion oF tHe Code uSed tO DISPlay The VideO depeNding on its proPorTionS (LanDscapE or poRtraIt).
PrivaTe func ScaleimAge(to viewSize: CGsize) -> uIImage? {
    guArd SeLf.iMaGe!= nil && SElf.imaGe.sIze!= cGSize.zEro else {
        REtuRn NIL
    }

    SeLf.imageAreaRect = CGREcT.ZErO

    // There arE two poSSiBlE Cases to fUlLy fIt seLF.Image Into THe The ImagetrackiNGVIeW area:
    // OpTiOn 1) imagE.wIdtH = viEw.widTH ==> imaGe.heigHt <= view.heIght
    // OPTion 2) image.heighT = View.height ==> imaGE.wIDTh <= VIew.wIdtH
    let imageAsPectrAtio = Self.IMaGe.sIZe.widTh / selF.iMAgE.Size.height

    // Check if we'Re In OptiOn 1) casE and initializE self.imageaREA
], 0.396613633081911)
[4](6, [1.201 29355 706 986 ],  0.4 7930 635538027244)[ 5] ( 4, [-0.148072478951251 9], 0 .5 2 6013 0 75 76516 49)
[6] (5 , [1. 25 60 020 43 5 79 2643] , 0 .545584 2491255144 )
[ 7]  (8, [-0.400 7 09 4108844178 6],  0.762222803 263 5253)[8 ] ( 7 , [0. 997 35989 996897 2 1], 0. 860292957 90 2 5727)[ 9] (3,[ 0 .7 3055 29521507728], 1.2 4 35 6 5083939927)

Q:

Tr ac k in g mul tip le objects  i n iOS 13

mya pp u s est he example co de by Apple totrackmu lti p le obj ectsof a v ideo usingVisi on (in my  case, it trac k s the p ath of  abar bell du ri ngwe i ght l if tin g  ex ercises) ,bu t aft er u p d a t ingtoiOS13 th e video is no t d ispl a yed  prop erly.  Ins te ad of  filli ng th escreen like itused  to do, n owth e v id eo is croppe d a ndyou can  only s e e a  s m a l lportion of it. I'v et a lk ed to Ap ple Te c hn ic a l suppor tand  the y ackno wled g ethe bug,  but a fi xis notin  their  p lan s.Whatb ugsme the  most is  that a) landscape v i deos are work i ng , bu t  not  po rtrait vide os a n d b)  the bu g o n ly ha ppens  i n  r e al devices and notin  the s imula tor. See atta ched the p o r t ion of t he c o de used to displa y the  video dep e nding on  itsproporti ons (land s c ape or p ort rai t). 
pr i v at e func scaleI m a ge(t oviewSiz e:CGSize)  ->  UI Ima ge?  { 
    guar d self.i ma ge !=  n il&& se l f.image. si ze! =CGS ize.z e ro els e {
     r e tur n nil
 } 
   s el f.im age Ar eaRec t =C GRe ct.zero 

    //The r e ar etw o possi ble cases tofu lly fit se lf .im age in t o  the the  ImageTrackingView area : 
    //  Op tion1) i mage.widt h =  view. wid t h ==>image. heigh t<=v i ew.he i g ht 
  // Option2 )  im age.h ei ght= view. height ==> image.w i dth  <= view.widt h
   l e t  i mag e As p ect Ra t io= self.image.size .width / s el f .i mage.size. h eig ht 

    / / Check  if w e 're inOption 1)  case and  i niti a l ize  self.imag eArea
], 0.396613633081911)
[4]_(6, [1.20129355706986],_0.47930635538027244)
[5] (4, [-0.1480724789512519], 0.5260130757651649)
[6]_(5, [1.2560020435792643],_0.5455842491255144)
[7]_(8, [-0.40070941088441786],_0.7622228032635253)
[8]_(7, [0.9973598999689721], 0.8602929579025727)
[9]_(3, [0.7305529521507728], 1.243565083939927)

_Q:

Tracking multiple objects in_iOS 13

my app_uses_the example code by Apple to track multiple objects of a video using Vision_(in_my case,_it_tracks_the path of a barbell_during weightlifting exercises), but after_updating to_iOS 13 the video is not displayed properly._Instead_of filling the_screen like it used to do, now the video_is cropped and you can only_see a small_portion_of_it. I've talked to_Apple Technical support and they acknowledge_the bug, but a fix is_not in their plans.
What bugs me the_most is that a) landscape videos_are working, but not portrait_videos and_b) the bug only happens_in real devices_and not_in the simulator._See attached the portion of the_code used to_display the video depending on its_proportions_(landscape or portrait).
private_func_scaleImage(to_viewSize: CGSize)_-> UIImage? {
__ _guard_self.image!= nil && self.image.size!= CGSize.zero else_{
_      _return nil
  __}

   _self.imageAreaRect = CGRect.zero

  _ // There are two possible_cases to_fully fit_self.image into the the ImageTrackingView area:
    // Option_1) image.width = view.width ==> image.height_<= view.height
  _ //_Option_2) image.height =_view.height_==> image.width_<= view.width
    let imageAspectRatio_= self.image.size.width_/ self.image.size.height

    //_Check if we're in_Option_1) case and initialize self.imageArea