HoughLinesP错误地拒绝了行

时间:2018-01-18 17:26:43

标签: opencv

我发现HoughLinesP拒绝甚至超过minLineLength的行。例如,如果我打电话:

cv2.HoughLinesP(mat, 1, np.pi/180, 30, minLineLength=70, maxLineGap=8)

我得到(欧几里德)长度89.275.1等等。但如果我打电话:

cv2.HoughLinesP(mat, 1, np.pi/180, 30, minLineLength=75, maxLineGap=8)

89.275.1行被拒绝。

以下是89.2行(它是轮廓)的点:

[[[319, 325]], [[316, 328]], [[316, 329]], [[315, 330]], [[315, 331]], [[314, 332]], [[314, 334]], [[313, 335]], [[313, 336]], [[310, 339]], [[309, 338]], [[306, 338]], [[302, 334]], [[302, 333]], [[304, 331]], [[305, 331]], [[306, 330]], [[306, 329]], [[307, 328]], [[304, 331]], [[303, 331]], [[302, 330]], [[302, 329]], [[301, 328]], [[301, 327]], [[301, 328]], [[299, 330]], [[300, 331]], [[300, 332]], [[301, 332]], [[302, 333]], [[302, 335]], [[303, 336]], [[301, 338]], [[300, 338]], [[299, 339]], [[298, 338]], [[293, 338]], [[292, 337]], [[292, 336]], [[287, 331]], [[287, 330]], [[285, 332]], [[285, 335]], [[283, 337]], [[284, 337]], [[285, 336]], [[285, 332]], [[286, 331]], [[292, 337]], [[291, 338]], [[290, 338]], [[292, 338]], [[293, 339]], [[293, 340]], [[293, 339]], [[294, 338]], [[298, 338]], [[299, 339]], [[297, 341]], [[296, 341]], [[295, 342]], [[291, 342]], [[290, 343]], [[286, 343]], [[284, 341]], [[284, 340]], [[283, 339]], [[282, 339]], [[280, 337]], [[278, 337]], [[276, 335]], [[276, 334]], [[271, 334]], [[275, 334]], [[276, 335]], [[276, 336]], [[277, 337]], [[279, 337]], [[281, 339]], [[282, 339]], [[284, 341]], [[284, 342]], [[285, 343]], [[291, 343]], [[292, 342]], [[295, 342]], [[296, 341]], [[298, 341]], [[301, 338]], [[302, 338]], [[302, 337]], [[303, 336]], [[305, 338]], [[309, 338]], [[311, 340]], [[310, 341]], [[306, 341]], [[304, 343]], [[304, 345]], [[305, 345]], [[306, 346]], [[306, 347]], [[306, 346]], [[307, 345]], [[308, 345]], [[309, 346]], [[309, 347]], [[304, 352]], [[302, 352]], [[301, 353]], [[302, 352]], [[305, 352]], [[309, 348]], [[309, 345]], [[305, 345]], [[304, 344]], [[307, 341]], [[312, 341]], [[314, 343]], [[314, 345]], [[315, 346]], [[315, 348]], [[313, 350]], [[312, 350]], [[312, 352]], [[313, 353]], [[313, 355]], [[311, 357]], [[309, 355]], [[309, 354]], [[310, 353]], [[310, 352]], [[309, 353]], [[308, 352]], [[309, 353]], [[309, 354]], [[308, 355]], [[307, 354]], [[309, 356]], [[310, 356]], [[311, 357]], [[310, 358]], [[310, 359]], [[309, 360]], [[309, 361]], [[308, 362]], [[308, 363]], [[307, 364]], [[307, 365]], [[305, 367]], [[305, 368]], [[300, 373]], [[299, 373]], [[298, 372]], [[298, 370]], [[297, 371]], [[296, 371]], [[295, 370]], [[294, 370]], [[293, 369]], [[291, 369]], [[290, 368]], [[291, 369]], [[293, 369]], [[295, 371]], [[297, 371]], [[299, 373]], [[292, 380]], [[290, 380]], [[289, 379]], [[286, 379]], [[285, 378]], [[284, 379]], [[283, 379]], [[282, 378]], [[283, 379]], [[284, 379]], [[285, 378]], [[286, 379]], [[289, 379]], [[291, 381]], [[287, 385]], [[285, 385]], [[284, 386]], [[282, 386]], [[282, 387]], [[280, 389]], [[279, 388]], [[274, 388]], [[273, 387]], [[267, 387]], [[266, 388]], [[260, 388]], [[259, 389]], [[257, 389]], [[256, 388]], [[255, 388]], [[254, 387]], [[257, 384]], [[258, 384]], [[259, 385]], [[262, 385]], [[263, 384]], [[266, 384]], [[267, 383]], [[268, 383]], [[269, 382]], [[273, 382]], [[274, 381]], [[276, 381]], [[276, 380]], [[277, 379]], [[278, 379]], [[284, 373]], [[284, 372]], [[287, 369]], [[287, 368]], [[289, 366]], [[289, 365]], [[292, 362]], [[292, 361]], [[297, 356]], [[297, 355]], [[299, 353]], [[299, 352]], [[298, 351]], [[300, 349]], [[299, 349]], [[299, 350]], [[298, 351]], [[298, 353]], [[297, 354]], [[297, 355]], [[292, 360]], [[292, 361]], [[289, 364]], [[289, 365]], [[287, 367]], [[287, 368]], [[284, 371]], [[284, 372]], [[283, 373]], [[283, 374]], [[282, 375]], [[281, 375]], [[277, 379]], [[276, 379]], [[276, 380]], [[275, 381]], [[274, 381]], [[273, 382]], [[268, 382]], [[267, 383]], [[266, 383]], [[265, 384]], [[263, 384]], [[262, 385]], [[259, 385]], [[258, 384]], [[257, 384]], [[256, 385]], [[255, 385]], [[255, 386]], [[254, 387]], [[253, 386]], [[252, 386]], [[251, 385]], [[246, 385]], [[244, 387]], [[245, 388]], [[243, 390]], [[242, 390]], [[241, 389]], [[240, 389]], [[239, 388]], [[236, 388]], [[235, 389]], [[227, 389]], [[227, 390]], [[228, 390]], [[229, 389]], [[235, 389]], [[236, 388]], [[238, 388]], [[239, 389]], [[240, 389]], [[241, 390]], [[244, 390]], [[244, 389]], [[245, 388]], [[244, 387]], [[245, 386]], [[246, 386]], [[247, 385]], [[250, 385]], [[251, 386]], [[252, 386]], [[254, 388]], [[256, 388]], [[257, 389]], [[258, 389]], [[259, 390]], [[259, 391]], [[260, 391]], [[262, 393]], [[263, 393]], [[264, 394]], [[264, 395]], [[268, 399]], [[268, 400]], [[270, 402]], [[270, 404]], [[271, 405]], [[271, 408]], [[272, 409]], [[276, 409]], [[278, 407]], [[279, 407]], [[280, 406]], [[281, 406]], [[282, 405]], [[284, 407]], [[285, 407]], [[286, 408]], [[288, 408]], [[287, 408]], [[286, 407]], [[285, 407]], [[284, 406]], [[283, 406]], [[282, 405]], [[281, 406]], [[280, 406]], [[279, 407]], [[278, 407]], [[277, 408]], [[276, 408]], [[275, 409]], [[273, 409]], [[271, 407]], [[271, 404]], [[270, 403]], [[270, 401]], [[267, 398]], [[267, 397]], [[269, 395]], [[270, 395]], [[271, 396]], [[272, 396]], [[271, 396]], [[270, 395]], [[268, 395]], [[267, 394]], [[267, 393]], [[267, 394]], [[268, 395]], [[268, 396]], [[267, 397]], [[264, 394]], [[264, 393]], [[263, 393]], [[261, 391]], [[260, 391]], [[259, 390]], [[259, 389]], [[260, 388]], [[266, 388]], [[267, 387]], [[273, 387]], [[274, 388]], [[279, 388]], [[280, 389]], [[281, 388]], [[282, 388]], [[282, 387]], [[283, 386]], [[285, 386]], [[286, 385]], [[288, 385]], [[300, 373]], [[301, 373]], [[305, 369]], [[305, 368]], [[307, 366]], [[307, 365]], [[308, 364]], [[308, 363]], [[309, 362]], [[309, 361]], [[310, 360]], [[310, 359]], [[313, 356]], [[313, 355]], [[315, 353]], [[323, 353]], [[322, 352]], [[322, 351]], [[321, 351]], [[320, 350]], [[318, 350]], [[317, 349]], [[317, 348]], [[314, 345]], [[314, 343]], [[313, 342]], [[313, 341]], [[312, 341]], [[310, 339]], [[311, 338]], [[312, 338]], [[313, 337]], [[313, 335]], [[314, 334]], [[314, 332]], [[316, 330]], [[316, 329]], [[319, 326]], [[320, 326]], [[321, 327]], [[321, 328]], [[322, 329]], [[322, 331]], [[320, 333]], [[321, 333]], [[323, 335]], [[322, 336]], [[322, 337]], [[321, 338]], [[320, 338]], [[319, 337]], [[318, 337]], [[317, 336]], [[316, 336]], [[317, 336]], [[318, 337]], [[319, 337]], [[320, 338]], [[322, 338]], [[322, 337]], [[324, 335]], [[325, 336]], [[326, 336]], [[327, 337]], [[327, 339]], [[327, 337]], [[328, 336]], [[330, 336]], [[331, 337]], [[330, 336]], [[332, 334]], [[334, 334]], [[335, 333]], [[337, 335]], [[339, 335]], [[340, 336]], [[342, 336]], [[340, 336]], [[339, 335]], [[338, 335]], [[337, 334]], [[336, 334]], [[335, 333]], [[337, 331]], [[334, 334]], [[331, 334]], [[329, 336]], [[326, 336]], [[325, 335]], [[323, 335]], [[321, 333]], [[322, 332]], [[322, 331]], [[323, 330]], [[324, 330]], [[325, 331]], [[325, 332]], [[325, 331]], [[324, 330]], [[325, 329]], [[324, 330]], [[323, 330]], [[322, 329]], [[322, 328]], [[321, 327]], [[321, 326]], [[320, 326]]]

以下是75.1行的要点:

[[[482, 253]], [[481, 254]], [[472, 254]], [[471, 255]], [[467, 255]], [[466, 256]], [[461, 256]], [[460, 257]], [[456, 257]], [[455, 258]], [[451, 258]], [[450, 259]], [[446, 259]], [[445, 260]], [[442, 260]], [[441, 261]], [[436, 261]], [[435, 262]], [[432, 262]], [[431, 261]], [[430, 261]], [[429, 260]], [[428, 261]], [[427, 260]], [[424, 260]], [[423, 261]], [[422, 261]], [[422, 262]], [[420, 264]], [[419, 264]], [[418, 263]], [[418, 259]], [[419, 258]], [[425, 258]], [[417, 258]], [[416, 259]], [[417, 258]], [[418, 259]], [[418, 262]], [[417, 263]], [[415, 261]], [[412, 261]], [[412, 264]], [[412, 262]], [[413, 261]], [[414, 261]], [[415, 262]], [[414, 263]], [[414, 264]], [[415, 265]], [[414, 264]], [[416, 262]], [[418, 264]], [[418, 265]], [[416, 267]], [[414, 267]], [[413, 266]], [[410, 266]], [[410, 267]], [[408, 269]], [[407, 269]], [[406, 270]], [[405, 270]], [[404, 269]], [[403, 270]], [[400, 270]], [[398, 272]], [[398, 273]], [[397, 274]], [[396, 273]], [[396, 272]], [[394, 272]], [[395, 272]], [[397, 274]], [[401, 270]], [[406, 270]], [[407, 269]], [[409, 269]], [[410, 268]], [[410, 267]], [[411, 266]], [[413, 266]], [[414, 267]], [[416, 267]], [[417, 266]], [[418, 266]], [[420, 268]], [[421, 268]], [[418, 265]], [[419, 264]], [[421, 264]], [[422, 263]], [[422, 262]], [[424, 260]], [[427, 260]], [[428, 261]], [[426, 263]], [[424, 263]], [[426, 263]], [[427, 262]], [[428, 262]], [[428, 261]], [[429, 260]], [[430, 261]], [[431, 261]], [[432, 262]], [[435, 262]], [[436, 261]], [[441, 261]], [[442, 260]], [[445, 260]], [[446, 259]], [[450, 259]], [[451, 258]], [[455, 258]], [[456, 257]], [[460, 257]], [[461, 256]], [[466, 256]], [[467, 255]], [[471, 255]], [[472, 254]], [[482, 254]], [[483, 253]], [[485, 253]]]

如何不尊重minLineLength

0 个答案:

没有答案