Research Article

A BigBiGAN-Based Loop Closure Detection Algorithm for Indoor Visual SLAM

Algorithm 2

Loop closure main component.
Input: RGB image
Output: a loop closure detection result
(1)img ⟵ GetRGBgray (RGB)
(2)x ⟵ FeatureExtraction(img)
(3)FOR i= 1 to BoWD. Length() DO
(4)  IF x==BoWD[i] THEN
(5)    DTRUE
(6)  ENDFOR
(7)  IF D THEN
(8)  FOR i= 1 to BoWG. Length() DO
(9)   IF x==BoWG[i] THEN
(10)     GTRUE
(11)  END FOR
(12)ELSE
(13)  RETURN FALSE
(14)END IF
(15)IF G THEN
(16)   L ⟵ ORBCheck(imgCollection[i], img)
(17)ELSE
(18)  RETURN FALSE
(19)END IF
(20)IF L THEN
(21)  RETURN TRUE
(22)ELSE
(23)  RETURN FALSE
(24)END IF