Skip to content

Conversation

@ysolovyov
Copy link

@ysolovyov ysolovyov commented Aug 15, 2018

This is workaround for crash caused by _tmpl_sz.width or _tmpl_sz.height be equal to 2*cell_size. Later in getFeatureMaps(&z_ipl, cell_size, &map) dimensions of the CvLSVMFeatureMapCaskade *map will be set to [_tmpl_sz.width / cell_size, _tmpl_sz.height / cell_size] and in normalizeAndTruncate(map, 0.2f) they will be changed to map.sizeX -= 2 and map.sizeY -= 2, so if, for example, _tmpl_sz.height == 2*cell_size then final map dimension will be map.sizeY == 0, that does not make sense and there will be crash in createHanningMats() during multiplacation of two matrixes.

Actual assert in OpenCV

OpenCV Error: Assertion failed (type == (((6) & ((1 << 3) - 1)) + (((2)-1) << 3))) in gemmImpl, file /opencv/modules/core/src/matmul.cpp, line 1218

in

cv::Mat hann2d = hann2t * hann1t; because hann2t has size [1 x 0]

@ysolovyov ysolovyov closed this by deleting the head repository Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant