def hot_points_get(self, image_array): image_data = [0]*self.len_array for i in range(self.len_array): image_data[i] = ((image_array[i][0] + image_array[i][1] + image_array[i][2]) - variables.sensible_3) image_scanned = numpy.array(image_data) image_scanned = numpy.reshape(image_scanned, (self.im_height, self.im_width)) #We clean the old array self.hot_points = [] image_scanned = self.border_make(image_scanned) #We follow the matrice for ki in range(self.hei): for kj in range(self.wid): i = (ki * self.minSize) + 2 j = (kj * self.minSize) + 2 #There is a hot point ! if image_scanned[i][j] > 0: #Init a new zone self.Cadre = [j, i, j, i] #we set Min_x, Min_y, Max_x, Max_y self.Barycentre = [j, i] #x and y barycentre self.Poids = image_scanned[i][j] #Weight of actual barycentre image_scanned[i][j] = 0 #Kill this point #Get the hot zone, (by reccurence) self.hot_point_zone(j, i, image_scanned) #Get the size of the hot point, and add him if he is not too small Cadre_Size = (self.Cadre[2] - self.Cadre[0]) * (self.Cadre[3] - self.Cadre[1]) if Cadre_Size > self.minSize: Temp_Info = [self.Cadre, self.Barycentre, self.Poids] self.hot_points.append(Temp_Info) return self.hot_points