There are a few approaches that might work, and per the comments: the best approach would be buying a system from someone else.
Google "machine vision rice sorter" and related terms and you'll find some systems that strike me as fairly inexpensive.
Canny, Sobel, Laplacian, etc and also
Those kernel-based techniques will generate edge data, but don't segment. That is, they don't separate foreground (rice) from background (everything else).
morphological operations like erosion, dilation, opening and closing.
Those algorithms can help if the overlap between grains were always much smaller than the grains themselves.
There are a bunch of other techniques that will kinda work much of the time, but presumably you want an approach that's robust and will work nearly all of the time. Pick a specific value for the acceptable percentage of recognition failures over a large number of cases.
What failure rate is acceptable? 5%? 1%? 0.1%? If you won't buy an existing system, you might still call the equipment manufacturer and ask for performance specs. Assume you won't achieve specs as good.
The rice grains aren't occupying the full width of the image. It'd help if they occupied the middle 80%, with a bit of allowance for flyaway grains. It looks to me like you might even want the long axis of the image to be vertical.
Robust pattern matching
Different vision libraries give different names to an algorithmic approach that finds objects based on edge content. This typically works well only for rigid objects of fixed outline, but with "wide open" parameter settings it might work for rice grains.
HALCON software from mvTec has this. Here's a video on the subject (which I've only skimmed, since I already know about the feature):
https://www.youtube.com/watch?v=QUAasLJhGng
A few other companies offer similar algorithms in commercial image processing software. It's a royal pain to implement--we're talking developer-years of effort, back in the day--although there are some simpler, related techniques like "chamfer-based matching" (or some other such term with "chamfer" in it).
I'd stress: don't try this until you've work in vision at least 2+ years, and have implemented a few other algorithms from scratch.
The wonders of curve completion
OpenCV has a lot of useful image processing functions, but it doesn't offer curve fitting and curve completion, at least not that I recall, and not in the sense that you may need.
Before I go on, I want to make clear that implementing curve fitting for small, irregularly shaped objects would increase the complexity of your code enormously. There'd be more failure modes. You might make a better mechanical sorter from raw materials in less time than it would take to code up a solution based on curve completion.
If you can make a lot of assumptions about the consistency of objects in view, then when you have two or more grains of rice that are overlapping, there's a (not great) chance you could distinguish the grains of rice by fitting curves where there are overlapping grains. (You'd have to first determine which grains are overlapping. That'd take some effort.)
The best, fastest method I know about relevant to fitting curves to natural shapes is the Euler spiral a.k.a. aesthetic curve a.k.a. clothoid. And for that, and as my final comment, I'll direct you to some old replies of mine.
How to draw clothoids graphically in Qt?
Only semi-related:
How to smooth hand drawn lines?