2

I would like to post an answer to this question but the editor does not let me click on "Post your answer" and tells me that:

Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.

The answer content is:

I think it is because your variable calibration_flags as CALIB_CHECK_COND set.
Try disabling this flag. Without it I was able to undistort your images (see links below).

I am not sure what this check is for (the [documentation][1] is not very explicit). This flag reject some images¹ of my gopro hero 3 even when the chessboard is visible and detected. In my case one image among 20 is not passing this test. This image has the chessboard close to the left border.

https://i.sstatic.net/m2WF6.jpg
https://i.sstatic.net/KiTRz.jpg
https://i.sstatic.net/MhHyN.jpg
https://i.sstatic.net/pSiyG.jpg
https://i.sstatic.net/drXSL.jpg
https://i.sstatic.net/DDze1.jpg
https://i.sstatic.net/b6l8f.jpg
https://i.sstatic.net/9MrAk.jpg
https://i.sstatic.net/WYmg5.jpg
https://i.sstatic.net/rmJ5Q.jpg
https://i.sstatic.net/K8k8Y.jpg
https://i.sstatic.net/MiBER.jpg


¹ in OpenCV versions >= 3.4.1 the [error message][2] tells you which image is not passing the test


  [1]: https://docs.opencv.org/3.4.1/db/d58/group__calib3d__fisheye.html
  [2]: https://github.com/opencv/opencv/pull/9067/commits/5ca7dcc6e74b9c6068b8de1f49f289d6bc6b5a0b

I understand that you have to do checks but the editor does not tell me on which line(s) the problem is so it is a bit frustrating. I have already posted 18 answers on the network and never had such problem before.

It could be due to the fact that I first tried to use back quotes around calibration_flags and CALIB_CHECK_COND, but even after removing them the problem persists.

9
  • 3
    There is a known issue when you list a series of images, like you have done here. Let me find the report.
    – Martijn Pieters Mod
    Commented Mar 23, 2018 at 11:19
  • 1
    You need to, at least, use ![alt text](image url) for those images.
    – Martijn Pieters Mod
    Commented Mar 23, 2018 at 11:21
  • In the meantime, at least try to post your answer content here, formatted as a code block. pastebin.com does not keep content forever nor can we rely on their lifetime as a site matching the lifetime of this post.
    – Martijn Pieters Mod
    Commented Mar 23, 2018 at 11:24
  • Similar to Link reference produces error “Your post appears to contain code that is not properly formatted as code” (but you didn't link the images).
    – Martijn Pieters Mod
    Commented Mar 23, 2018 at 11:25
  • The dupe I remember lives on Meta.SE: Question gets error: Please indent all code by 4 spaces
    – Martijn Pieters Mod
    Commented Mar 23, 2018 at 11:29
  • Thanks for the explanation @MartijnPieters. I did not want the images to be shown so I added them as links. That was not enough: each link had to be on a new line. Given that detected errors prevent you from posting I really think they should be explained to the user. Commented Mar 23, 2018 at 11:56
  • (a bullet list removes the need for new lines) Commented Mar 23, 2018 at 12:05
  • @MartijnPieters maybe you remembered who posted it and were looking for this instead?
    – rene
    Commented Mar 23, 2018 at 22:05
  • @rene: ah-HA! That’s more like it. The error message text is missing from that post, so I couldn’t find it.
    – Martijn Pieters Mod
    Commented Mar 23, 2018 at 22:46

1 Answer 1

7

At issue is your list of links; these are forming a repetitive block of lines without any discernable English in them, thus are seen as code.

You'd want to give those lines a bullet list:

- https://i.sstatic.net/m2WF6.jpg
- https://i.sstatic.net/KiTRz.jpg
- https://i.sstatic.net/MhHyN.jpg
- https://i.sstatic.net/pSiyG.jpg
- https://i.sstatic.net/drXSL.jpg
- https://i.sstatic.net/DDze1.jpg
- https://i.sstatic.net/b6l8f.jpg
- https://i.sstatic.net/9MrAk.jpg
- https://i.sstatic.net/WYmg5.jpg
- https://i.sstatic.net/rmJ5Q.jpg
- https://i.sstatic.net/K8k8Y.jpg
- https://i.sstatic.net/MiBER.jpg

so it renders as

Consider giving those links more descriptive text with [link text](...) markup.

Not the answer you're looking for? Browse other questions tagged .