Removal of shadow from Matlab image for recognition of seeds of plants
Have you gone through the "rice grains" tutorial?
(a) (b) (c) (d)

I suspect that feeding your image into the process described in the "rice grains" tutorial,
with minor tweaks -- perhaps changing the

background = imopen(I,strel('disk',15));


step to perhaps something more like

background = imopen(I,strel('disk',600));


would produce a images closer to what you wanted.