You have a couple of issue that you need to fix in order to use connected components in Imagemagick.
First, your image is JPG and possibly antialiased and thus grayscale. (JPG is lossy compression and changes values). Thus it needs to be made binary or you will get too many regions for what you want to do.
Second, you need to use -define connected-components:mean-color=true in order to have the output image look like the input image and not have grayscale correspond to region ID numbers.
For example, if I do the following on your input image, I get lots of grayscale regions.
convert image.jpg \
-define connected-components:verbose=true \
-define connected-components:area-threshold=0 \
-define connected-components:mean-color=true \
-connected-components 4 \
null:
0: 818x687+0+0 420.4,339.2 393850 gray(255)
6405: 213x232+560+260 667.8,373.2 38867 gray(255)
1066: 212x197+46+61 145.7,161.0 32689 gray(255)
11470: 197x189+180+453 278.4,547.6 27921 gray(255)
4764: 259x279+536+236 667.8,372.1 14056 gray(0)
86: 258x261+22+21 144.0,156.7 13604 gray(0)
10418: 241x236+159+430 278.8,546.4 12060 gray(0)
8450: 4x40+538+304 539.5,323.5 160 gray(2)
14378: 2x57+158+496 158.5,523.8 113 gray(3)
10247: 31x6+260+425 278.7,427.6 98 gray(255)
5996: 32x5+106+257 121.2,259.2 89 gray(255)
15035: 43x3+656+514 676.8,515.5 85 gray(0)
14031: 41x4+659+490 678.3,492.3 81 gray(255)
9942: 2x41+795+407 795.5,427.2 81 gray(4)
3152: 2x32+22+144 22.5,159.5 64 gray(3)
11234: 29x6+264+449 279.1,451.8 64 gray(0)
15824: 4x16+378+568 379.5,575.5 64 gray(2)
284: 28x5+127+33 140.6,35.3 61 gray(255)
14375: 3x58+153+496 154.9,525.4 60 gray(254)
14374: 1x56+154+496 154.0,523.5 56 gray(252)
14377: 1x56+157+496 157.0,523.5 56 gray(0)
14376: 1x56+156+496 156.0,523.5 56 gray(252)
7795: 28x3+101+282 114.5,283.5 54 gray(0)
...
In the above full listing, there are more that 3 black regions.
But if I threshold at 50% to make the image purely black and white saving as PNG, then I get
convert image.jpg -threshold 50% -type bilevel \
-define connected-components:verbose=true \
-define connected-components:area-threshold=0 \
-define connected-components:mean-color=true \
-connected-components 4 \
null:
Objects (id: bounding-box centroid area mean-color):
0: 818x687+0+0 419.2,339.3 401926 gray(255)
4: 215x236+560+258 668.0,373.6 41506 gray(255)
2: 215x202+44+60 145.1,161.4 34718 gray(255)
6: 197x192+180+452 278.1,547.3 29700 gray(255)
3: 262x283+536+234 666.8,372.5 19261 gray(0)
1: 262x265+20+20 143.2,155.8 18388 gray(0)
5: 243x239+157+428 277.3,546.1 16467 gray(0)
Note that there are now only 3 gray(0), i.e. black regions. If there were some tiny spots of black, you could increase the area-threshold to remove them.
Now to extract your regions, I would do the following. I would extract the bounding box and centroid with an underscore between them and put in to an array. I would save the thresholded image as output of the connected-components (which can be done by using -define connected-components:mean-color=true. Then I would loop over the thresholded image, flood fill the regions (assuming they are closed) after extracting the centroid and then crop after extracting the bounding box.
Input:

box_cent_Arr=(`convert image.jpg -threshold 50% -type bilevel \
-define connected-components:verbose=true \
-define connected-components:mean-color=true \
-connected-components 4 \
image_t50.png | grep "gray(0)" | awk 'BEGIN {OFS="_"} {print $2,$3}'`)
num=${#box_cent_Arr[*]}
for ((i=0; i<num; i++)); do
bbox=`echo "${box_cent_Arr[$i]}" | cut -d\_ -f1`
centroid=`echo "${box_cent_Arr[$i]}" | cut -d\_ -f2`
convert image_t50.png -fill black -draw "color $centroid floodfill" -alpha off -crop $bbox +repage image_$i.png
done
Thresholded Image:

Three extracted filled regions:


With regard to your second image:

In this case, you do not need to fill them, so just use the bounding box. But you need to increase the area-threshold to remove the small spots next to the third row/second column region. So here I would do the following:
bboxArr=(`convert image.png -threshold 50% -type bilevel \
-define connected-components:verbose=true \
-define connected-components:area-threshold=1000 \
-define connected-components:mean-color=true \
-connected-components 4 \
image_t50.png | grep "gray(0)" | awk '{print $2}'`)
num=${#bboxArr[*]}
for ((i=0; i<num; i++)); do
bbox=`echo "${bboxArr[$i]}" | cut -d\_ -f1`
convert image_t50.png -crop $bbox +repage image_$i.png
done
The result are 22 regions extracted (that I numbered 0 to 21). For example, here are the first 3:


