@@ -259,7 +259,7 @@ void LineFinder::FindAndRemoveLines(int resolution, bool debug, Image pix, int *
259259 if (pix_hline != nullptr ) {
260260 // Recompute intersections and re-filter false positive h-lines.
261261 if (pix_vline != nullptr ) {
262- pixAnd ( pix_intersections, pix_vline, pix_hline) ;
262+ pix_intersections = pix_vline & pix_hline;
263263 } else {
264264 pix_intersections.destroy ();
265265 }
@@ -278,7 +278,7 @@ void LineFinder::FindAndRemoveLines(int resolution, bool debug, Image pix, int *
278278 if (pix_vline != nullptr && pix_hline != nullptr ) {
279279 // Remove joins (intersections) where lines cross, and the residue.
280280 // Recalculate the intersections, since some lines have been deleted.
281- pixAnd ( pix_intersections, pix_vline, pix_hline) ;
281+ pix_intersections = pix_vline & pix_hline;
282282 // Fatten up the intersections and seed-fill to get the intersection
283283 // residue.
284284 Image pix_join_residue = pixDilateBrick (nullptr , pix_intersections, 5 , 5 );
@@ -483,7 +483,7 @@ void LineFinder::FindLineVectors(const ICOORD &bleft, const ICOORD &tright,
483483static Image FilterMusic (int resolution, Image pix_closed, Image pix_vline, Image pix_hline,
484484 bool &v_empty, bool &h_empty) {
485485 int max_stave_height = static_cast <int >(resolution * kMaxStaveHeight );
486- Image intersection_pix = pixAnd ( nullptr , pix_vline, pix_hline) ;
486+ Image intersection_pix = pix_vline & pix_hline;
487487 Boxa *boxa = pixConnComp (pix_vline, nullptr , 8 );
488488 // Iterate over the boxes to find music bars.
489489 int nboxes = boxaGetCount (boxa);
@@ -637,7 +637,7 @@ void LineFinder::GetLineMasks(int resolution, Image src_pix, Image *pix_vline, I
637637 if (!h_empty) {
638638 pixSubtract (pix_nonlines, pix_nonlines, *pix_hline);
639639 // Intersections are a useful indicator for likelihood of being a line.
640- *pix_intersections = pixAnd ( nullptr , *pix_vline, *pix_hline) ;
640+ *pix_intersections = *pix_vline & *pix_hline;
641641 // Candidate vlines are not hlines (apart from the intersections)
642642 // and vice versa.
643643 extra_non_hlines = pixSubtract (nullptr , *pix_vline, *pix_intersections);
0 commit comments